-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add coverage for Python torch bindings
- Loading branch information
1 parent
434f923
commit 97dba02
Showing
5 changed files
with
64 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,11 @@ | ||
coverage: | ||
ignore: | ||
- tests/.* | ||
status: | ||
project: | ||
default: | ||
target: 80% | ||
patch: off | ||
ignore: | ||
- "tests/.*" | ||
- "examples/.*" | ||
|
||
comment: off | ||
|
||
fixes: | ||
# map coverage collected inside tox virtual environments | ||
# to the source dir in git | ||
- ".tox/all-deps/lib/*/site-packages/::python/" | ||
comment: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -38,7 +38,7 @@ jobs: | |
- name: install python dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install tox | ||
python -m pip install tox coverage | ||
- name: install lcov | ||
run: sudo apt install -y lcov | ||
|
@@ -47,7 +47,7 @@ jobs: | |
uses: actions/cache@v3 | ||
with: | ||
path: .tox | ||
key: tox-${{ matrix.os }}-${{ hashFiles('pyproject.toml', 'setup.cfg', 'tox.ini') }} | ||
key: tox-${{ hashFiles('pyproject.toml', 'setup.cfg', 'tox.ini') }} | ||
|
||
- name: Setup sccache | ||
uses: mozilla-actions/[email protected] | ||
|
@@ -69,10 +69,22 @@ jobs: | |
lcov --remove coverage.info '/usr/*' "$(pwd)/rascaline-c-api/tests/*" "$(pwd)/rascaline-c-api/examples/*" --output-file coverage.info | ||
- name: collect Python coverage | ||
run: tox -e all-deps | ||
run: | | ||
tox -e all-deps | ||
tox -e torch-tests | ||
env: | ||
# Use the CPU only version of torch when building/running the code | ||
PIP_EXTRA_INDEX_URL: https://download.pytorch.org/whl/cpu | ||
|
||
- name: combine Python coverage files | ||
run: | | ||
coverage combine \ | ||
.coverage \ | ||
./python/rascaline-torch/.coverage \ | ||
coverage xml | ||
- name: upload to codecov.io | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
fail_ci_if_error: true | ||
files: target/tarpaulin/cobertura.xml,.tox/coverage.xml,coverage.info | ||
files: target/tarpaulin/cobertura.xml,coverage.xml,coverage.info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters