A feature-rich command-line audio/video downloader
[ci] Improve workflow checks (#14316)
bashonlyae3923b6b23b
diff --git a/.github/workflows/test-workflows.yml b/.github/workflows/test-workflows.ymlindex 36ff86e48d..c07e01d7af 100644--- a/.github/workflows/test-workflows.yml+++ b/.github/workflows/test-workflows.yml@@ -3,12 +3,14 @@ on:push:paths:- .github/workflows/*+ - bundle/docker/linux/*.sh- devscripts/setup_variables.py- devscripts/setup_variables_tests.py- devscripts/utils.pypull_request:paths:- .github/workflows/*+ - bundle/docker/linux/*.sh- devscripts/setup_variables.py- devscripts/setup_variables_tests.py- devscripts/utils.py@@ -32,6 +34,7 @@ jobs:env:ACTIONLINT_TARBALL: ${{ format('actionlint_{0}_linux_amd64.tar.gz', env.ACTIONLINT_VERSION) }}run: |+ python -m devscripts.install_deps -o --include testsudo apt -y install shellcheckpython -m pip install -U pyflakescurl -LO "${ACTIONLINT_REPO}/releases/download/v${ACTIONLINT_VERSION}/${ACTIONLINT_TARBALL}"@@ -41,6 +44,9 @@ jobs:- name: Run actionlintrun: |./actionlint -color+ - name: Check Docker shell scripts+ run: |+ shellcheck bundle/docker/linux/*.sh- name: Test GHA devscriptsrun: |- python -m devscripts.setup_variables_tests+ pytest -Werror --tb=short devscripts/setup_variables_tests.pydiff --git a/bundle/docker/linux/build.sh b/bundle/docker/linux/build.shindex b278ebf60f..71adaad058 100755--- a/bundle/docker/linux/build.sh+++ b/bundle/docker/linux/build.sh@@ -24,6 +24,7 @@ if [[ -z "${EXCLUDE_CURL_CFFI:-}" ]]; thenfirunpy -m venv /yt-dlp-build-venv+# shellcheck disable=SC1091source /yt-dlp-build-venv/bin/activate# Inside the venv we use venvpy instead of runpyvenvpy -m ensurepip --upgrade --default-pipdiff --git a/devscripts/setup_variables_tests.py b/devscripts/setup_variables_tests.pyindex 8cb52daa1f..42abba9d1f 100644--- a/devscripts/setup_variables_tests.py+++ b/devscripts/setup_variables_tests.py@@ -1,4 +1,3 @@-# Allow direct executionimport osimport sys@@ -55,7 +54,7 @@ def _test(github_repository, note, repo_vars, repo_secrets, inputs, expected=Nonassert result == exp, f'unexpected result: {github_repository} {note}'-def main():+def test_setup_variables():DEFAULT_VERSION_WITH_REVISION = dt.datetime.now(tz=dt.timezone.utc).strftime('%Y.%m.%d.%H%M%S')DEFAULT_VERSION = calculate_version()BASE_REPO_VARS = {@@ -323,9 +322,3 @@ def main():'pypi_project': None,'pypi_suffix': None,}, ignore_revision=True)-- print('all tests passed')---if __name__ == '__main__':- main()