-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: Run coverage tests in parallel (#399)
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
Showing
1 changed file
with
12 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -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: | ||
|
@@ -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 | ||
|
@@ -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: | ||
|