Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update codecov and add flag for integration tests #667

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,12 @@ jobs:
python -m pip install invoke .[test]
- name: Run integration tests
run: invoke integration

- if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.12
name: Upload integration codecov report
uses: codecov/codecov-action@v4
with:
flags: integration
file: ${{ github.workspace }}/integration_cov.xml
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
10 changes: 8 additions & 2 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ 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

- if: matrix.os == 'ubuntu-latest' && matrix.python-version == 3.12
name: Upload unit codecov report
uses: codecov/codecov-action@v4
with:
flags: unit
file: ${{ github.workspace }}/unit_cov.xml
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ coverage.xml
*.cover
.hypothesis/
.pytest_cache/
*_cov.xml

# Translations
*.mo
Expand Down Expand Up @@ -108,4 +109,3 @@ ENV/

# OS Files
.DS_Store

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

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


@task
def integration(c):
c.run('python -m pytest ./tests/integration --reruns 5 --disable-warnings')
c.run('python -m pytest ./tests/integration --reruns 5 --disable-warnings --cov=sdmetrics --cov-report=xml:./integration_cov.xml')


def _get_minimum_versions(dependencies, python_version):
Expand Down
Loading