From 45757ef0a6f3290aaad06cbcecd3e74bf82a8205 Mon Sep 17 00:00:00 2001 From: "Keto D. Zhang" Date: Wed, 20 Nov 2024 00:25:18 -0800 Subject: [PATCH] fixup! ci: configure pr's matrix from hatch env json file --- .github/workflows/pr.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index d53f80b..3f3b617 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -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 @@ -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