Skip to content

Commit

Permalink
Add codecov to integration and unit
Browse files Browse the repository at this point in the history
  • Loading branch information
pvk-developer committed Nov 15, 2024
1 parent 276d23a commit 28ae7dd
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 5 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/end_to_end.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,11 @@ jobs:
python -m pip install invoke .[test]
- name: Run end to end tests
run: invoke end-to-end

- if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.9
name: Upload integration codecov report
uses: codecov/codecov-action@v4
with:
flags: integration
file: './integration_cov.xml'
token: ${{ secrets.CODECOV_TOKEN }}
11 changes: 8 additions & 3 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ jobs:
python -m pip install invoke .[test]
- name: Run unit tests
run: invoke unit
- if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.8
name: Upload codecov report
uses: codecov/codecov-action@v2

- if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.9
name: Upload unit codecov report
uses: codecov/codecov-action@v4
with:
flags: unit
file: './unit_cov.xml'
token: ${{ secrets.CODECOV_TOKEN }}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -114,3 +114,6 @@ ENV/

# tutorials
tutorials/mymodel.pkl

# Codecov
*_cov.xml
4 changes: 2 additions & 2 deletions tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ def check_dependencies(c):

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


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


@task
Expand Down

0 comments on commit 28ae7dd

Please sign in to comment.