diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index d66e52b5a9..169eaa8aa5 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -6,7 +6,7 @@ on: types: [opened, reopened] env: - DEFAULT_PYTHON_VERSION: '3.10.6' + DEFAULT_PYTHON_VERSION: '3.10.11' jobs: build: @@ -14,8 +14,8 @@ jobs: strategy: fail-fast: true matrix: - os: ["ubuntu-20.04"] # On peut ajouter "macos-latest" si besoin - python-version: ["3.9.9", "3.10.6"] + os: ["ubuntu-24.04"] # On peut ajouter "macos-latest" si besoin + python-version: ["3.9.12", "3.10.11"] openfisca-dependencies: [minimal, maximal] steps: - name: Checkout @@ -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,8 +116,8 @@ jobs: strategy: fail-fast: true matrix: - os: [ "ubuntu-20.04" ] # On peut ajouter "macos-latest" si besoin - python-version: ["3.9.9", "3.10.6"] + os: [ "ubuntu-24.04" ] # On peut ajouter "macos-latest" si besoin + python-version: ["3.9.12", "3.10.11"] openfisca-dependencies: [minimal, maximal] steps: - uses: actions/checkout@v4 @@ -134,10 +134,10 @@ jobs: - run: | shopt -s globstar openfisca test --country-package openfisca_france tests/**/*.py - if: matrix.openfisca-dependencies != 'minimal' || matrix.python-version != '3.9.9' + if: matrix.openfisca-dependencies != 'minimal' || matrix.python-version != '3.9.12' 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