Skip to content

Commit

Permalink
Use xml coverage, delete tox env. "report"
Browse files Browse the repository at this point in the history
  • Loading branch information
mdbenito authored Sep 22, 2023
1 parent fe42747 commit 72c80e7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 18 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/run-tests-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,12 @@ jobs:
if: inputs.tests_to_run == 'base'
- name: Test Modules that rely on PyTorch
run: tox -e torch
if: inputs.tests_to_run == 'torch'
if: inputs.tests_to_run == 'torch'
- name: Test Notebooks
run: tox -e notebooks
if: inputs.tests_to_run == 'notebooks'
continue-on-error: true
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
22 changes: 5 additions & 17 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[tox]
envlist = base, report
[tox]
envlist = base
wheel = true

[testenv]
Expand All @@ -17,19 +17,19 @@ setenv =
[testenv:base]
description = Tests base modules
commands =
pytest --cov "{envsitepackagesdir}/pydvl" -m "not torch" {posargs}
pytest --cov "{envsitepackagesdir}/pydvl" -m "not torch" --cov-report=xml {posargs}

[testenv:torch]
description = Tests modules that rely on pytorch
commands =
pytest --cov "{envsitepackagesdir}/pydvl" -m torch {posargs}
pytest --cov "{envsitepackagesdir}/pydvl" -m torch --cov-report=xml{posargs}
extras =
influence

[testenv:notebooks]
description = Tests notebooks
commands =
pytest notebooks/ --cov "{envsitepackagesdir}/pydvl"
pytest notebooks/ --cov "{envsitepackagesdir}/pydvl" --cov-report=xml
deps =
{[testenv]deps}
jupyter==1.0.0
Expand All @@ -40,18 +40,6 @@ extras =
passenv =
CI

[testenv:report]
setenv =
skip_install = true
commands =
coverage combine --debug=trace
coverage html
coverage-badge -o badges/coverage.svg -f
coverage erase
deps =
coverage[toml]
coverage-badge

[testenv:linting]
skip_install = true
setenv =
Expand Down

0 comments on commit 72c80e7

Please sign in to comment.