kopia lustrzana https://github.com/jupyterhub/repo2docker
Merge pull request #982 from betatim/codecov-for-gh-actions
[MRG] Experiment with different install mechanism to get code coverage stats againpull/1008/head
commit
ac41c201a3
|
@ -1,5 +1,7 @@
|
|||
# show coverage in CI status, not as a comment.
|
||||
# show coverage in CI status, not as a comment.
|
||||
comment: off
|
||||
fixes:
|
||||
- "*/site-packages/::"
|
||||
coverage:
|
||||
status:
|
||||
project:
|
||||
|
@ -7,4 +9,4 @@ coverage:
|
|||
target: auto
|
||||
patch:
|
||||
default:
|
||||
target: 20%
|
||||
target: 20%
|
||||
|
|
13
.coveragerc
13
.coveragerc
|
@ -1,3 +1,16 @@
|
|||
[run]
|
||||
# this file comes from versioneer and we don't test it
|
||||
omit = */_version.py
|
||||
|
||||
[paths]
|
||||
# This tells coverage how to combine results together or said differently
|
||||
# which files at different paths are actually the same file
|
||||
# documented at https://coverage.readthedocs.io/en/latest/config.html#paths
|
||||
# Yes, we list repo2docker twice here. This allows you to install repo2docker
|
||||
# with `pip install -e.` for local development and from the wheel (as done on
|
||||
# CI) and get `repo2docker/foo.py` as paths in the coverage report
|
||||
source =
|
||||
repo2docker
|
||||
repo2docker
|
||||
../repo2docker
|
||||
*/site-packages/repo2docker
|
||||
|
|
|
@ -114,7 +114,11 @@ jobs:
|
|||
|
||||
- name: "Run tests"
|
||||
run: |
|
||||
pytest --durations 10 --cov repo2docker -v tests/${{ matrix.repo_type }}
|
||||
cd tests
|
||||
pytest --durations 10 --cov repo2docker -v ${{ matrix.repo_type }}
|
||||
|
||||
# Action Repo: https://github.com/codecov/codecov-action
|
||||
- uses: codecov/codecov-action@v1
|
||||
- name: "Upload code coverage stats"
|
||||
run: |
|
||||
pip install codecov
|
||||
pushd tests && codecov && cat
|
||||
cat /home/runner/work/repo2docker/repo2docker/tests/coverage.xml
|
||||
|
|
Ładowanie…
Reference in New Issue