File tree 1 file changed +20
-3
lines changed
1 file changed +20
-3
lines changed Original file line number Diff line number Diff line change 8
8
workflow_dispatch :
9
9
10
10
jobs :
11
+ define-matirx :
12
+ runs-on : ubuntu-latest
13
+ outputs :
14
+ matrix : ${{ steps.set-matrix.outputs.matrix }}
15
+ steps :
16
+ - name : Checkout
17
+ uses : actions/checkout@v3
18
+
19
+ - name : Set matrix
20
+ id : set-matrix
21
+ run : |
22
+ python -m pip install hatch
23
+ {
24
+ echo 'hatchenv<<EOF'
25
+ echo $(hatch env show --json | jq -r 'to_entries[] | select(.key | startswith("test")) | .key')
26
+ echo 'EOF'
27
+ } >> "$GITHUB_OUTPUT"
28
+
11
29
test :
12
30
13
31
runs-on : ubuntu-latest
14
32
strategy :
15
33
fail-fast : false
16
34
matrix :
17
- python-version : ["3.9", "3.10", "3.11", "3.12"]
35
+ env : ${{fromJson(needs.define-matirx.outputs.hatchenv)}}
18
36
19
37
steps :
20
38
- uses : actions/checkout@v3
24
42
python-version : ${{ matrix.python-version }}
25
43
- name : Install Python dependencies
26
44
run : |
27
- python -m pip install --upgrade pip
28
45
python -m pip install hatch
29
46
- name : Pytest
30
- run : hatch -v run +py= ${{ matrix.python-version }} test :test
47
+ run : hatch -v run ${{ matrix.env }}:test
You can’t perform that action at this time.
0 commit comments