File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88 workflow_dispatch :
99
1010jobs :
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+
1129 test :
1230
1331 runs-on : ubuntu-latest
1432 strategy :
1533 fail-fast : false
1634 matrix :
17- python-version : ["3.9", "3.10", "3.11", "3.12"]
35+ env : ${{fromJson(needs.define-matirx.outputs.hatchenv)}}
1836
1937 steps :
2038 - uses : actions/checkout@v3
2442 python-version : ${{ matrix.python-version }}
2543 - name : Install Python dependencies
2644 run : |
27- python -m pip install --upgrade pip
2845 python -m pip install hatch
2946 - 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