Skip to content

Commit 0ff4d22

Browse files
Enhance the Code Coverage Workflows (#2302)
1 parent ad7579f commit 0ff4d22

File tree

4 files changed

+20
-4
lines changed

4 files changed

+20
-4
lines changed

.github/workflows/integration.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,12 @@ jobs:
3939
run: |
4040
invoke integration
4141
invoke benchmark-dtypes
42-
- if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.9
42+
43+
- if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.12
4344
name: Upload integration codecov report
4445
uses: codecov/codecov-action@v4
4546
with:
4647
flags: integration
47-
file: './integration_cov.xml'
48+
file: ${{ github.workspace }}/integration_cov.xml
49+
fail_ci_if_error: true
4850
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/unit.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,11 @@ jobs:
3434
python -m pip install invoke .[test]
3535
- name: Run unit tests
3636
run: invoke unit
37-
- if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.9
37+
- if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.12
3838
name: Upload unit codecov report
3939
uses: codecov/codecov-action@v4
4040
with:
4141
flags: unit
42-
file: './unit_cov.xml'
42+
file: ${{ github.workspace }}/unit_cov.xml
43+
fail_ci_if_error: true
4344
token: ${{ secrets.CODECOV_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ coverage.xml
4848
*.cover
4949
.hypothesis/
5050
.pytest_cache/
51+
*_cov.xml
5152

5253
# Translations
5354
*.mo

codecov.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
coverage:
2+
precision: 2
3+
range: "90...100"
4+
status:
5+
project:
6+
default:
7+
target: auto
8+
threshold: 1.0
9+
patch:
10+
default:
11+
target: auto
12+
threshold: 1.0

0 commit comments

Comments
 (0)