Skip to content

Commit 827851f

Browse files
Update codecov and add flag for integration tests (#441)
1 parent 28b2377 commit 827851f

File tree

4 files changed

+21
-5
lines changed

4 files changed

+21
-5
lines changed

.github/workflows/end_to_end.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,12 @@ jobs:
2929
python -m pip install invoke .[test]
3030
- name: Run end to end tests
3131
run: invoke end-to-end
32+
33+
- if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.12
34+
name: Upload integration codecov report
35+
uses: codecov/codecov-action@v4
36+
with:
37+
flags: integration
38+
file: ${{ github.workspace }}/integration_cov.xml
39+
fail_ci_if_error: true
40+
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/unit.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@ jobs:
2929
python -m pip install invoke .[test]
3030
- name: Run unit tests
3131
run: invoke unit
32-
- if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.8
33-
name: Upload codecov report
34-
uses: codecov/codecov-action@v2
32+
33+
- if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.12
34+
name: Upload unit codecov report
35+
uses: codecov/codecov-action@v4
36+
with:
37+
flags: unit
38+
file: ${{ github.workspace }}/unit_cov.xml
39+
fail_ci_if_error: true
40+
token: ${{ secrets.CODECOV_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ coverage.xml
4646
*.cover
4747
.hypothesis/
4848
.pytest_cache/
49+
*_cov.xml
4950

5051
# Translations
5152
*.mo

tasks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,12 @@ def check_dependencies(c):
3434

3535
@task
3636
def unit(c):
37-
c.run('python -m pytest ./tests/unit --cov=copulas --cov-report=xml')
37+
c.run('python -m pytest ./tests/unit --cov=copulas --cov-report=xml:./unit_cov.xml')
3838

3939

4040
@task
4141
def end_to_end(c):
42-
c.run('python -m pytest ./tests/end-to-end --reruns 3')
42+
c.run('python -m pytest ./tests/end-to-end --reruns 3 --cov=copulas --cov-report=xml:./integration_cov.xml')
4343

4444

4545
@task

0 commit comments

Comments
 (0)