Skip to content

Commit dcda271

Browse files
authored
Fix Codecov code coverage analysis from test data (#1434)
This PR does a few things in pursuit of fixing our integrated code coverage analysis provided by Codecov: It removes the last usage of invoke from our GitHub Actions CI scripts. Now we rely purely on uv for everything. Uploading of data to Codecov is now done using a private token which is stored in GitHub secrets for this repo. Both test data and code coverage are now uploaded.
1 parent 5f21816 commit dcda271

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

.github/workflows/tests.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,24 @@ jobs:
3636
run: uv sync --all-extras --dev
3737

3838
- name: Run tests
39-
run: uv run inv pytest --junit --no-pty --base
39+
run: uv run python -m pytest --cov --cov-config=pyproject.toml --cov-report=xml tests
4040

4141
- name: Run isolated tests
42-
run: uv run inv pytest --junit --no-pty --isolated
42+
run: uv run python -m pytest --cov --cov-config=pyproject.toml --cov-report=xml tests_isolated
4343

44-
- name: Upload coverage reports to Codecov with GitHub Action on Python 3.13 for each OS
44+
- name: Upload test results to Codecov
45+
if: ${{ !cancelled() }}
46+
uses: codecov/test-results-action@v1
47+
with:
48+
flags: python${{ matrix.python-version }}
49+
name: codecov-umbrella-test-results
50+
token: ${{ secrets.CODECOV_TOKEN }}
51+
- name: Upload coverage to Codecov
4552
uses: codecov/codecov-action@v5
46-
if: ${{ matrix.python-version == '3.13' }}
53+
with:
54+
env_vars: OS,PYTHON
55+
fail_ci_if_error: true
56+
flags: unittests
57+
name: codecov-umbrella
58+
token: ${{ secrets.CODECOV_TOKEN }}
59+
verbose: true

0 commit comments

Comments
 (0)