From 3d758c6369d07e36abd8f93ea0aafe4e19c9e29a Mon Sep 17 00:00:00 2001 From: Remco de Boer <29308176+redeboer@users.noreply.github.com> Date: Wed, 9 Oct 2024 18:04:37 +0200 Subject: [PATCH] BEHAVIOR: switch to `ubuntu-24.04` (#86) --- .github/workflows/cd.yml | 2 +- .github/workflows/ci-docs.yml | 2 +- .github/workflows/close-milestone.yml | 2 +- .github/workflows/docnb.yml | 2 +- .github/workflows/get-pypi-name.yml | 2 +- .github/workflows/linkcheck.yml | 2 +- .github/workflows/pr-linting.yml | 4 ++-- .github/workflows/pre-commit.yml | 8 ++++---- .github/workflows/push-to-version-branches.yml | 2 +- .github/workflows/pytest.yml | 2 +- .github/workflows/requirements.yml | 8 ++++---- create-pytest-matrix/main.py | 12 +++++++++--- 12 files changed, 27 insertions(+), 21 deletions(-) diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index 62e54df3..d1309885 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -13,7 +13,7 @@ jobs: push-to-version-branches: name: Push to version branches if: startsWith(github.ref, 'refs/tags') && !github.event.release.prerelease - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - name: Configure Git credentials diff --git a/.github/workflows/ci-docs.yml b/.github/workflows/ci-docs.yml index 6a7f913c..e0f149b9 100644 --- a/.github/workflows/ci-docs.yml +++ b/.github/workflows/ci-docs.yml @@ -43,7 +43,7 @@ jobs: permissions: pages: write id-token: write - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - id: deployment uses: actions/deploy-pages@v4 diff --git a/.github/workflows/close-milestone.yml b/.github/workflows/close-milestone.yml index 5bb9b7f9..838a6b22 100644 --- a/.github/workflows/close-milestone.yml +++ b/.github/workflows/close-milestone.yml @@ -3,7 +3,7 @@ on: jobs: close-milestone: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: mhutchie/update-milestone-on-release@master with: diff --git a/.github/workflows/docnb.yml b/.github/workflows/docnb.yml index 9f9acb57..2d7418aa 100644 --- a/.github/workflows/docnb.yml +++ b/.github/workflows/docnb.yml @@ -15,7 +15,7 @@ on: jobs: docnb: name: Execute and build documentation - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - uses: ComPWA/actions/pip-install@v1 diff --git a/.github/workflows/get-pypi-name.yml b/.github/workflows/get-pypi-name.yml index 089a38bf..fc4a1085 100644 --- a/.github/workflows/get-pypi-name.yml +++ b/.github/workflows/get-pypi-name.yml @@ -10,7 +10,7 @@ jobs: package-name: if: startsWith(github.ref, 'refs/tags') name: Determine package name - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 outputs: name: ${{ steps.package-name.outputs.name }} steps: diff --git a/.github/workflows/linkcheck.yml b/.github/workflows/linkcheck.yml index f00aacec..01ea8ae0 100644 --- a/.github/workflows/linkcheck.yml +++ b/.github/workflows/linkcheck.yml @@ -12,7 +12,7 @@ on: jobs: linkcheck: name: Check external links - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - uses: ComPWA/actions/pip-install@v1 diff --git a/.github/workflows/pr-linting.yml b/.github/workflows/pr-linting.yml index c5ee5463..097019b1 100644 --- a/.github/workflows/pr-linting.yml +++ b/.github/workflows/pr-linting.yml @@ -14,7 +14,7 @@ jobs: check-labels: if: github.event.pull_request.state == 'open' name: Check labels - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: docker://agilepathway/pull-request-label-checker:latest # cspell:ignore agilepathway with: @@ -26,7 +26,7 @@ jobs: check-title: if: github.event.pull_request.state == 'open' name: Check title - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - run: npm install @compwa/commitlint-config diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index d58b1d8d..f4ee590d 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -26,7 +26,7 @@ jobs: outputs: skipped-hooks: ${{ steps.hooks.outputs.skipped-hooks }} taplo-version: ${{ steps.taplo.outputs.taplo-version }} - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - id: hooks uses: ComPWA/actions/get-skipped-pre-commit-hooks@v1 @@ -42,7 +42,7 @@ jobs: if: >- ${{ needs.determine-hooks.outputs.skipped-hooks != '' && needs.determine-hooks.outputs.skipped-hooks != 'taplo' }} needs: determine-hooks - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - uses: actions/setup-python@v5 @@ -113,7 +113,7 @@ jobs: if: needs.determine-hooks.outputs.taplo-version != '' name: Run taplo through pre-commit needs: determine-hooks - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - run: git config --global --add safe.directory $(pwd) @@ -153,7 +153,7 @@ jobs: needs: - pre-commit - taplo - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 with: diff --git a/.github/workflows/push-to-version-branches.yml b/.github/workflows/push-to-version-branches.yml index 80479316..e8376875 100644 --- a/.github/workflows/push-to-version-branches.yml +++ b/.github/workflows/push-to-version-branches.yml @@ -5,7 +5,7 @@ jobs: push: name: Push to version branches if: startsWith(github.ref, 'refs/tags') && !github.event.release.prerelease - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - name: Configure Git credentials diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index cdd1ac2b..aad7eb68 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -37,7 +37,7 @@ jobs: name: Determine job matrix outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - id: set-matrix uses: ComPWA/actions/create-pytest-matrix@v1 diff --git a/.github/workflows/requirements.yml b/.github/workflows/requirements.yml index fa065f1e..143951a5 100644 --- a/.github/workflows/requirements.yml +++ b/.github/workflows/requirements.yml @@ -24,7 +24,7 @@ jobs: github.event.pull_request.head.repo.full_name == github.repository outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - id: set-matrix uses: ComPWA/actions/create-python-version-matrix@v1 @@ -49,7 +49,7 @@ jobs: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || github.event.pull_request.head.repo.full_name == github.repository - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - uses: ComPWA/update-pre-commit@v1 @@ -58,7 +58,7 @@ jobs: name: Check if PR already exists outputs: exists: ${{ steps.pr-exists.outputs.exists }} - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - name: List open pull requests @@ -91,7 +91,7 @@ jobs: push: name: Push changes - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 needs: - pip-constraints - pr-exists diff --git a/create-pytest-matrix/main.py b/create-pytest-matrix/main.py index 5539c312..6456123d 100644 --- a/create-pytest-matrix/main.py +++ b/create-pytest-matrix/main.py @@ -36,7 +36,7 @@ def _format_skipped_version(skipped_python_versions: str) -> set[str] | None: return set(skipped_python_versions.split(" ")) -def create_job_matrix( +def create_job_matrix( # noqa: C901 coverage_python_version: str, coverage_target: str, macos_python_version: str, @@ -66,11 +66,17 @@ def create_job_matrix( "python-version": "3.6", "runs-on": "ubuntu-20.04", }) + if "3.7" in python_versions: + python_versions.remove("3.7") + includes.append({ + "python-version": "3.7", + "runs-on": "ubuntu-22.04", + }) if coverage_target: includes.append({ "coverage-target": coverage_target, "python-version": coverage_python_version, - "runs-on": "ubuntu-22.04", + "runs-on": "ubuntu-24.04", }) if macos_python_version: includes.append({ @@ -81,7 +87,7 @@ def create_job_matrix( if python_versions: matrix = { "python-version": python_versions, - "runs-on": ["ubuntu-22.04"], + "runs-on": ["ubuntu-24.04"], } if includes: matrix["include"] = includes