From bece639fad641e128493913e6fe7c566766906f0 Mon Sep 17 00:00:00 2001 From: Ivana Kellyerova Date: Tue, 5 Dec 2023 15:26:48 +0100 Subject: [PATCH] skip empty py versions --- .../test-integrations-cloud-computing.yml | 4 ++-- .../test-integrations-data-processing.yml | 2 +- .../workflows/test-integrations-databases.yml | 2 +- .github/workflows/test-integrations-graphql.yml | 2 +- .../test-integrations-miscellaneous.yml | 2 +- .../workflows/test-integrations-networking.yml | 2 +- .../test-integrations-web-frameworks-1.yml | 2 +- .../test-integrations-web-frameworks-2.yml | 2 +- .../split-tox-gh-actions/split-tox-gh-actions.py | 16 +++++++++------- .../templates/test_group.jinja | 2 +- 10 files changed, 19 insertions(+), 17 deletions(-) diff --git a/.github/workflows/test-integrations-cloud-computing.yml b/.github/workflows/test-integrations-cloud-computing.yml index 629af4f051..b5c4a782d6 100644 --- a/.github/workflows/test-integrations-cloud-computing.yml +++ b/.github/workflows/test-integrations-cloud-computing.yml @@ -24,7 +24,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.6","3.7","3.9","3.10","3.11","3.12"] + python-version: ["3.7","3.10","3.11","3.12"] # python3.6 reached EOL and is no longer being supported on # new versions of hosted runners on Github Actions # ubuntu-20.04 is the last version that supported python3.6 @@ -89,7 +89,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.6","3.7","3.9","3.10","3.11","3.12"] + python-version: ["3.6","3.7","3.9","3.11","3.12"] # python3.6 reached EOL and is no longer being supported on # new versions of hosted runners on Github Actions # ubuntu-20.04 is the last version that supported python3.6 diff --git a/.github/workflows/test-integrations-data-processing.yml b/.github/workflows/test-integrations-data-processing.yml index baf7c0c6cc..23d2b1beb6 100644 --- a/.github/workflows/test-integrations-data-processing.yml +++ b/.github/workflows/test-integrations-data-processing.yml @@ -24,7 +24,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.5","3.6","3.7","3.8","3.9","3.10","3.11","3.12"] + python-version: ["3.5","3.7","3.8","3.11","3.12"] # python3.6 reached EOL and is no longer being supported on # new versions of hosted runners on Github Actions # ubuntu-20.04 is the last version that supported python3.6 diff --git a/.github/workflows/test-integrations-databases.yml b/.github/workflows/test-integrations-databases.yml index 2cb1fd4495..c943de52db 100644 --- a/.github/workflows/test-integrations-databases.yml +++ b/.github/workflows/test-integrations-databases.yml @@ -24,7 +24,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12"] + python-version: ["3.7","3.8","3.11","3.12"] # python3.6 reached EOL and is no longer being supported on # new versions of hosted runners on Github Actions # ubuntu-20.04 is the last version that supported python3.6 diff --git a/.github/workflows/test-integrations-graphql.yml b/.github/workflows/test-integrations-graphql.yml index 7a793d5efc..4ac08e2a8a 100644 --- a/.github/workflows/test-integrations-graphql.yml +++ b/.github/workflows/test-integrations-graphql.yml @@ -89,7 +89,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.7","3.8","3.11","3.12"] + python-version: ["3.7","3.8","3.11"] # python3.6 reached EOL and is no longer being supported on # new versions of hosted runners on Github Actions # ubuntu-20.04 is the last version that supported python3.6 diff --git a/.github/workflows/test-integrations-miscellaneous.yml b/.github/workflows/test-integrations-miscellaneous.yml index c17a71ccd0..62fad718a2 100644 --- a/.github/workflows/test-integrations-miscellaneous.yml +++ b/.github/workflows/test-integrations-miscellaneous.yml @@ -24,7 +24,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.5","3.6","3.7","3.8","3.9","3.11","3.12"] + python-version: ["3.5","3.8","3.11","3.12"] # python3.6 reached EOL and is no longer being supported on # new versions of hosted runners on Github Actions # ubuntu-20.04 is the last version that supported python3.6 diff --git a/.github/workflows/test-integrations-networking.yml b/.github/workflows/test-integrations-networking.yml index 9d31e507af..3141b6f8c7 100644 --- a/.github/workflows/test-integrations-networking.yml +++ b/.github/workflows/test-integrations-networking.yml @@ -24,7 +24,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.6","3.7","3.8","3.9","3.10","3.11","3.12"] + python-version: ["3.8","3.9","3.11","3.12"] # python3.6 reached EOL and is no longer being supported on # new versions of hosted runners on Github Actions # ubuntu-20.04 is the last version that supported python3.6 diff --git a/.github/workflows/test-integrations-web-frameworks-1.yml b/.github/workflows/test-integrations-web-frameworks-1.yml index c729516e95..fadee09aef 100644 --- a/.github/workflows/test-integrations-web-frameworks-1.yml +++ b/.github/workflows/test-integrations-web-frameworks-1.yml @@ -24,7 +24,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.5","3.6","3.7","3.8","3.9","3.10","3.11","3.12"] + python-version: ["3.8","3.10","3.11","3.12"] # python3.6 reached EOL and is no longer being supported on # new versions of hosted runners on Github Actions # ubuntu-20.04 is the last version that supported python3.6 diff --git a/.github/workflows/test-integrations-web-frameworks-2.yml b/.github/workflows/test-integrations-web-frameworks-2.yml index 66c952ae2f..6ebabf6b9a 100644 --- a/.github/workflows/test-integrations-web-frameworks-2.yml +++ b/.github/workflows/test-integrations-web-frameworks-2.yml @@ -24,7 +24,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: ["3.5","3.6","3.7","3.8","3.9","3.11","3.12"] + python-version: ["3.5","3.6","3.7","3.8","3.11","3.12"] # python3.6 reached EOL and is no longer being supported on # new versions of hosted runners on Github Actions # ubuntu-20.04 is the last version that supported python3.6 diff --git a/scripts/split-tox-gh-actions/split-tox-gh-actions.py b/scripts/split-tox-gh-actions/split-tox-gh-actions.py index 2d60bf5719..2168609c5f 100755 --- a/scripts/split-tox-gh-actions/split-tox-gh-actions.py +++ b/scripts/split-tox-gh-actions/split-tox-gh-actions.py @@ -252,7 +252,7 @@ def render_template(group, frameworks, py_versions_pinned, py_versions_latest): template = ENV.get_template("base.jinja") categories = set() - matrix_py_versions = set() + matrix_py_versions = defaultdict(set) for framework in frameworks: if py_versions_pinned[framework]: categories.add("pinned") @@ -261,10 +261,11 @@ def render_template(group, frameworks, py_versions_pinned, py_versions_latest): if "2.7" in py_versions_pinned[framework]: categories.add("py27") - matrix_py_versions |= set(py_versions_pinned[framework]) - matrix_py_versions |= set(py_versions_latest[framework]) + matrix_py_versions["pinned"] |= set(py_versions_pinned[framework]) + matrix_py_versions["latest"] |= set(py_versions_latest[framework]) - matrix_py_versions.discard("2.7") + matrix_py_versions["pinned"].discard("2.7") + matrix_py_versions["latest"].discard("2.7") context = { "group": group, @@ -276,9 +277,10 @@ def render_template(group, frameworks, py_versions_pinned, py_versions_latest): "needs_github_secrets": bool( set(frameworks) & FRAMEWORKS_NEEDING_GITHUB_SECRETS ), - "all_versions": [ - f'"{version}"' for version in _normalize_py_versions(matrix_py_versions) - ], + "versions": { + category: [f'"{version}"' for version in _normalize_py_versions(versions)] + for category, versions in matrix_py_versions.items() + }, } rendered = template.render(context) rendered = postprocess_template(rendered) diff --git a/scripts/split-tox-gh-actions/templates/test_group.jinja b/scripts/split-tox-gh-actions/templates/test_group.jinja index 6e7b93e0d9..91e51df381 100644 --- a/scripts/split-tox-gh-actions/templates/test_group.jinja +++ b/scripts/split-tox-gh-actions/templates/test_group.jinja @@ -14,7 +14,7 @@ strategy: fail-fast: false matrix: - python-version: [{{ all_versions|join(",") }}] + python-version: [{{ versions.get(category)|join(",") }}] # python3.6 reached EOL and is no longer being supported on # new versions of hosted runners on Github Actions # ubuntu-20.04 is the last version that supported python3.6