File tree 2 files changed +49
-4
lines changed
2 files changed +49
-4
lines changed Original file line number Diff line number Diff line change
1
+ {
2
+ "include" : [
3
+ {
4
+ "hatch-env-name" : " test.py3.10-numpy-version=1" ,
5
+ "python-version" : " 3.10"
6
+ },
7
+ {
8
+ "hatch-env-name" : " test.py3.10-numpy-version=2" ,
9
+ "python-version" : " 3.10"
10
+ },
11
+ {
12
+ "hatch-env-name" : " test.py3.11-numpy-version=1" ,
13
+ "python-version" : " 3.11"
14
+ },
15
+ {
16
+ "hatch-env-name" : " test.py3.11-numpy-version=2" ,
17
+ "python-version" : " 3.11"
18
+ },
19
+ {
20
+ "hatch-env-name" : " test.py3.12-numpy-version=1" ,
21
+ "python-version" : " 3.12"
22
+ },
23
+ {
24
+ "hatch-env-name" : " test.py3.12-numpy-version=2" ,
25
+ "python-version" : " 3.12"
26
+ },
27
+ {
28
+ "hatch-env-name" : " test.py3.13-numpy-version=1" ,
29
+ "python-version" : " 3.13"
30
+ },
31
+ {
32
+ "hatch-env-name" : " test.py3.13-numpy-version=2" ,
33
+ "python-version" : " 3.13"
34
+ }
35
+ ]
36
+ }
Original file line number Diff line number Diff line change 6
6
branches : ["main", "v1"]
7
7
8
8
jobs :
9
+ prepare-matrix :
10
+ runs-on : ubuntu-latest
11
+ outputs :
12
+ matrix : ${{ steps.set-matrix.outputs.matrix }}
13
+ steps :
14
+ - uses : actions/checkout@v4
15
+ - name : Set matrix
16
+ id : set-matrix
17
+ run : echo "matrix=$(cat .github/workflows/hatch-matrix.json | jq -c )" >> $GITHUB_OUTPUT
9
18
test :
10
19
runs-on : ubuntu-latest
20
+ needs : prepare-matrix
11
21
strategy :
12
22
fail-fast : false
13
- matrix :
14
- python-version : ["3.10", "3.11", "3.12", "3.13"]
23
+ matrix : ${{ fromJson(needs.prepare-matrix.outputs.matrix) }}
15
24
16
25
steps :
17
26
- uses : actions/checkout@v4
24
33
python -m pip install --upgrade pip
25
34
python -m pip install hatch
26
35
- name : Pytest
27
- run : hatch run +py= ${{ matrix.python-version }} test: test-cov
36
+ run : hatch -e ${{ matrix.hatch-env-name }} run test-cov
28
37
- name : Coverage report
29
- run : hatch run +py=${{ matrix.python-version }} test: cov-report
38
+ run : hatch run cov-report
You can’t perform that action at this time.
0 commit comments