From 2c2e17e8fca0ec9e66a58639bd988df4cb0d9e44 Mon Sep 17 00:00:00 2001 From: benoit-cty <4-benoit-cty@users.noreply.git.leximpact.dev> Date: Tue, 4 Mar 2025 17:01:55 +0100 Subject: [PATCH] Bump Ubuntu in CI --- .github/workflows/workflow.yml | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index d66e52b5a9..4b6b1ec181 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -14,7 +14,7 @@ jobs: strategy: fail-fast: true matrix: - os: ["ubuntu-20.04"] # On peut ajouter "macos-latest" si besoin + os: ["ubuntu-24.04"] # On peut ajouter "macos-latest" si besoin python-version: ["3.9.9", "3.10.6"] openfisca-dependencies: [minimal, maximal] steps: @@ -84,7 +84,7 @@ jobs: lint-files: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 strategy: matrix: dependencies-version: [maximal] @@ -102,7 +102,7 @@ jobs: uses: actions/cache@v4 with: path: ${{ env.pythonLocation }} - key: build-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-${{ github.sha }}-ubuntu-20.04-${{ matrix.dependencies-version }} + key: build-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-${{ github.sha }}-ubuntu-24.04-${{ matrix.dependencies-version }} - run: make check-syntax-errors - run: make check-style - name: Lint Python files @@ -116,7 +116,7 @@ jobs: strategy: fail-fast: true matrix: - os: [ "ubuntu-20.04" ] # On peut ajouter "macos-latest" si besoin + os: [ "ubuntu-24.04" ] # On peut ajouter "macos-latest" si besoin python-version: ["3.9.9", "3.10.6"] openfisca-dependencies: [minimal, maximal] steps: @@ -137,7 +137,7 @@ jobs: if: matrix.openfisca-dependencies != 'minimal' || matrix.python-version != '3.9.9' test-path-length: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 - name: Set up Python @@ -148,7 +148,7 @@ jobs: run: make check-path-length test-yaml: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 needs: [ build ] strategy: fail-fast: false @@ -170,7 +170,7 @@ jobs: uses: actions/cache@v4 with: path: ${{ env.pythonLocation }} - key: build-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-${{ github.sha }}-ubuntu-20.04-${{ matrix.openfisca-dependencies }} + key: build-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-${{ github.sha }}-ubuntu-24.04-${{ matrix.openfisca-dependencies }} - name: Split YAML tests id: yaml-test env: @@ -183,7 +183,7 @@ jobs: openfisca test --country-package openfisca_france ${TEST_FILES_SUBLIST} test-api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 strategy: matrix: dependencies-version: [maximal] @@ -199,7 +199,7 @@ jobs: uses: actions/cache@v4 with: path: ${{ env.pythonLocation }} - key: build-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-${{ github.sha }}-ubuntu-20.04-${{ matrix.dependencies-version }} + key: build-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-${{ github.sha }}-ubuntu-24.04-${{ matrix.dependencies-version }} - name: Test the Web API run: "${GITHUB_WORKSPACE}/.github/test-api.sh" @@ -234,7 +234,7 @@ jobs: run: openfisca test tests/formulas/irpp.yaml check-version-and-changelog: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 needs: [ lint-files, test-python, test-yaml, test-api ] # Last job to run steps: - uses: actions/checkout@v4 @@ -251,7 +251,7 @@ jobs: # We build a separate job to substitute the halt option. # The `deploy` job is dependent on the output of the `check-for-functional-changes` job. check-for-functional-changes: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 if: github.ref == 'refs/heads/master' # Only triggered for the `master` branch needs: [ check-version-and-changelog ] outputs: @@ -268,7 +268,7 @@ jobs: run: if "${GITHUB_WORKSPACE}/.github/has-functional-changes.sh" ; then echo "::set-output name=status::success" ; fi deploy: - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 strategy: matrix: dependencies-version: [maximal] @@ -290,13 +290,13 @@ jobs: uses: actions/cache@v4 with: path: ${{ env.pythonLocation }} - key: build-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-${{ github.sha }}-ubuntu-20.04-${{ matrix.dependencies-version }} + key: build-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-${{ github.sha }}-ubuntu-24.04-${{ matrix.dependencies-version }} - name: Cache release id: restore-release uses: actions/cache@v4 with: path: dist - key: release-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-${{ github.sha }}-ubuntu-20.04-${{ matrix.dependencies-version }} + key: release-${{ env.pythonLocation }}-${{ hashFiles('pyproject.toml') }}-${{ github.sha }}-ubuntu-24.04-${{ matrix.dependencies-version }} - name: Upload a Python package to PyPi run: twine upload dist/* --username $PYPI_USERNAME --password $PYPI_TOKEN - name: Publish a git tag