Skip to content

Commit

Permalink
properly merge coverage reports
Browse files Browse the repository at this point in the history
  • Loading branch information
LarsKue committed Jun 14, 2024
1 parent 560233a commit 92d2603
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,24 +61,29 @@ jobs:
- name: Run JAX Tests
if: ${{ matrix.backend == 'jax' }}
run: |
python -m pytest tests/ -v -m "not (numpy or tensorflow or torch)" --cov bayesflow ${{ env.CODECOV_ATS_TESTS }}
pytest --cov bayesflow tests/ -v -m "not (numpy or tensorflow or torch)"
- name: Run NumPy Tests
if: ${{ matrix.backend == 'numpy' }}
run: |
python -m pytest tests/ -v -m "not (jax or tensorflow or torch)" --cov bayesflow ${{ env.CODECOV_ATS_TESTS }}
pytest --cov bayesflow tests/ -v -m "not (jax or tensorflow or torch)"
- name: Run TensorFlow Tests
if: ${{ matrix.backend == 'tensorflow' }}
run: |
python -m pytest tests/ -v -m "not (jax or numpy or torch)" --cov bayesflow ${{ env.CODECOV_ATS_TESTS }}
pytest --cov bayesflow tests/ -v -m "not (jax or numpy or torch)"
- name: Run PyTorch Tests
if: ${{ matrix.backend == 'torch' }}
run: |
python -m pytest tests/ -v -m "not (jax or numpy or tensorflow)" --cov bayesflow ${{ env.CODECOV_ATS_TESTS }}
pytest --cov bayesflow tests/ -v -m "not (jax or numpy or tensorflow)"
- name: Create Coverage Report
run: |
coverage xml
- name: Upload Coverage Reports to CodeCov
uses: codecov/codecov-action@v4
with:
# do not use the files attribute here, otherwise the reports are not merged correctly
token: ${{ secrets.CODECOV_TOKEN }}
10 changes: 4 additions & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ platform =

deps =
pytest
pytest-cov
pytest-xdist
jax:
jax[cpu]
numpy:
Expand All @@ -36,10 +34,10 @@ set_env =

commands =
jax:
python -m pytest tests/ -v -m "not (numpy or tensorflow or torch)"
pytest tests/ -v -m "not (numpy or tensorflow or torch)"
numpy:
python -m pytest tests/ -v -m "not (jax or tensorflow or torch)"
pytest tests/ -v -m "not (jax or tensorflow or torch)"
tensorflow:
python -m pytest tests/ -v -m "not (jax or numpy or torch)"
pytest tests/ -v -m "not (jax or numpy or torch)"
torch:
python -m pytest tests/ -v -m "not (jax or numpy or tensorflow)"
pytest tests/ -v -m "not (jax or numpy or tensorflow)"

0 comments on commit 92d2603

Please sign in to comment.