Skip to content

Commit 28ae7dd

Browse files
committed
Add codecov to integration and unit
1 parent 276d23a commit 28ae7dd

File tree

4 files changed

+21
-5
lines changed

4 files changed

+21
-5
lines changed

.github/workflows/end_to_end.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 end to end tests
3131
run: invoke end-to-end
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 & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,11 @@ 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.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: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,6 @@ ENV/
114114

115115
# tutorials
116116
tutorials/mymodel.pkl
117+
118+
# Codecov
119+
*_cov.xml

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)