Skip to content

Commit

Permalink
fixup! ci: configure pr's matrix from hatch env json file
Browse files Browse the repository at this point in the history
  • Loading branch information
ketozhang committed Nov 20, 2024
1 parent 33ad15a commit 45757ef
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,16 @@ jobs:
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- name: Set matrix
id: set-matrix
run: echo "matrix=$(cat .github/workflows/hatch-matrix.json | jq -c )" >> $GITHUB_OUTPUT
test:
runs-on: ubuntu-latest
needs: prepare-matrix
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
matrix: ${{ fromJson(needs.prepare-matrix.outputs.matrix) }}

steps:
- uses: actions/checkout@v4
Expand All @@ -32,6 +33,6 @@ jobs:
python -m pip install --upgrade pip
python -m pip install hatch
- name: Pytest
run: hatch run +py=${{ matrix.python-version }} test:test-cov
run: hatch -e ${{ matrix.hatch-env-name }} run test-cov
- name: Coverage report
run: hatch run +py=${{ matrix.python-version }} test:cov-report
run: hatch run cov-report

0 comments on commit 45757ef

Please sign in to comment.