Skip to content

Commit

Permalink
ci: Run coverage tests in parallel (#399)
Browse files Browse the repository at this point in the history
Instead of re-running the same tests again after the checks have
finished,
run the coverage tests in parallel with the required check.

Also use the latest supported python version for the latter, instead of
running the tests twice with the minimum py version.
  • Loading branch information
aborgna-q authored Aug 27, 2024
1 parent 7dc3bcf commit d5a1b6f
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,19 @@ on:
env:
SCCACHE_GHA_ENABLED: "true"
RUSTC_WRAPPER: "sccache"
# A constant location for the uv cache
UV_CACHE_DIR: /tmp/.uv-cache


jobs:
check:
name: Check Python
name: Check Python (3.10)
runs-on: ubuntu-latest

strategy:
matrix:
python-version: ['3.10']
env:
PYTHON_VERSION: '3.10'

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
- name: install-llvm
Expand All @@ -38,7 +37,7 @@ jobs:
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ env.PYTHON_VERSION }}
- name: Restore uv cache
uses: actions/cache@v4
with:
Expand Down Expand Up @@ -75,10 +74,12 @@ jobs:
- name: Minimize uv cache
run: uv cache prune --ci

coverage:
if: github.event_name != 'merge_group'
needs: check
test-coverage:
name: Check Python (3.12) with coverage
runs-on: ubuntu-latest
env:
PYTHON_VERSION: '3.12'

steps:
- uses: actions/checkout@v4
- name: Run sccache-cache
Expand All @@ -89,7 +90,7 @@ jobs:
- name: "Set up Python"
uses: actions/setup-python@v5
with:
python-version: '3.10'
python-version: ${{ env.PYTHON_VERSION }}
- name: Restore uv cache
uses: actions/cache@v4
with:
Expand Down

0 comments on commit d5a1b6f

Please sign in to comment.