Skip to content

Commit a7c1a46

Browse files
Update codecov and add flag for integration tests (#418)
1 parent d4b5ef5 commit a7c1a46

File tree

4 files changed

+19
-2
lines changed

4 files changed

+19
-2
lines changed

.github/workflows/integration.yml

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

.github/workflows/unit.yml

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

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ coverage.xml
4747
.hypothesis/
4848
.pytest_cache/
4949
tests/readme_test/
50+
*_cov.xml
5051

5152
# Translations
5253
*.mo

tasks.py

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

2525
@task
2626
def unit(c):
27-
c.run('python -m pytest ./tests/unit --cov=ctgan --cov-report=xml')
27+
c.run('python -m pytest ./tests/unit --cov=ctgan --cov-report=xml:./unit_cov.xml')
2828

2929

3030
@task
3131
def integration(c):
32-
c.run('python -m pytest ./tests/integration --reruns 3')
32+
c.run('python -m pytest ./tests/integration --reruns 3 --cov=ctgan --cov-report=xml:./integration_cov.xml')
3333

3434

3535
@task

0 commit comments

Comments
 (0)