From 7a837e5b1461cec851db751344e248ec1bc3758d Mon Sep 17 00:00:00 2001 From: Owen Lamont Date: Sat, 21 Dec 2024 20:41:06 +1030 Subject: [PATCH] Make coverage only run on the main test --- .github/workflows/pytest.yml | 38 +++++++++++++++++++++++++++--------- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index ec2a5af..d1ec42b 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -4,14 +4,6 @@ on: jobs: pytest: runs-on: ubuntu-latest - strategy: - matrix: - python-version: - - "3.9" - - "3.10" - - "3.11" - - "3.12" - - "3.13" permissions: contents: read pull-requests: write @@ -26,7 +18,7 @@ jobs: - name: Set up Python uses: actions/setup-python@v5 with: - python-version: ${{ matrix.python-version }} + python-version-file: ".python-version" - name: Install the project run: uv sync --all-extras --dev - name: Run tests with Coverage @@ -53,3 +45,31 @@ jobs: body-path: comment_body.md comment-id: ${{ steps.find-comment.outputs.comment-id }} edit-mode: replace + pytest-additional-versions: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: + - "3.10" + - "3.11" + - "3.12" + - "3.13" + permissions: + contents: read + pull-requests: write + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Install uv + uses: astral-sh/setup-uv@v4 + with: + enable-cache: true + cache-dependency-glob: "uv.lock" + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + - name: Install the project + run: uv sync --all-extras --dev + - name: Run tests + run: uv run pytest tests