@@ -12,11 +12,6 @@ concurrency:
1212 group : ${{ github.workflow }}-${{ github.ref }}
1313 cancel-in-progress : true
1414
15- defaults :
16- run :
17- # to fail on error in multiline statements (-e), in pipes (-o pipefail), and on unset variables (-u).
18- shell : bash -euo pipefail {0}
19-
2015jobs :
2116 # Get the test environment from hatch as defined in pyproject.toml.
2217 # This ensures that the pyproject.toml is the single point of truth for test definitions and the same tests are
@@ -28,12 +23,12 @@ jobs:
2823 outputs :
2924 envs : ${{ steps.get-envs.outputs.envs }}
3025 steps :
31- - uses : actions/checkout@v4
26+ - uses : actions/checkout@v5
3227 with :
3328 filter : blob:none
3429 fetch-depth : 0
3530 - name : Install uv
36- uses : astral-sh/setup-uv@v5
31+ uses : astral-sh/setup-uv@v7
3732 - name : Get test environments
3833 id : get-envs
3934 run : |
5146 # Run tests through hatch. Spawns a separate runner for each environment defined in the hatch matrix obtained above.
5247 test :
5348 needs : get-environments
49+ permissions :
50+ id-token : write # for codecov OIDC
5451
5552 strategy :
5653 fail-fast : false
@@ -60,35 +57,38 @@ jobs:
6057
6158 name : ${{ matrix.env.label }}
6259 runs-on : ${{ matrix.os }}
60+ continue-on-error : ${{ contains(matrix.env.name, 'pre') }} # make "all-green" pass even if pre-release job fails
6361
6462 steps :
65- - uses : actions/checkout@v4
63+ - uses : actions/checkout@v5
6664 with :
6765 filter : blob:none
6866 fetch-depth : 0
6967 - name : Install uv
70- uses : astral-sh/setup-uv@v5
68+ uses : astral-sh/setup-uv@v7
7169 with :
7270 python-version : ${{ matrix.env.python }}
73- cache-dependency-glob : pyproject.toml
7471 - name : create hatch environment
7572 run : uvx hatch env create ${{ matrix.env.name }}
7673 - name : run tests using hatch
7774 env :
7875 MPLBACKEND : agg
7976 PLATFORM : ${{ matrix.os }}
8077 DISPLAY : :42
81- run : uvx hatch run ${{ matrix.env.name }}:run-cov
78+ run : uvx hatch run ${{ matrix.env.name }}:run-cov -v --color=yes -n auto
8279 - name : generate coverage report
8380 run : |
84- # See https://coverage.readthedocs.io/en/latest/config.html#config- run-parallel
81+ # See https://coverage.readthedocs.io/en/latest/config.html#run-patch
8582 test -f .coverage || uvx hatch run ${{ matrix.env.name }}:cov-combine
8683 uvx hatch run ${{ matrix.env.name }}:cov-report # report visibly
8784 uvx hatch run ${{ matrix.env.name }}:coverage xml # create report for upload
8885 - name : Upload coverage
8986 uses : codecov/codecov-action@v5
9087 with :
9188 token : ${{ secrets.CODECOV_TOKEN }}
89+ fail_ci_if_error : true
90+ use_oidc : true
91+
9292
9393 # Check that all tests defined above pass. This makes it easy to set a single "required" test in branch
9494 # protection instead of having to update it frequently. See https://github.com/re-actors/alls-green#why.
0 commit comments