Skip to content

Commit ac41c20

Browse files
authored
Merge pull request #982 from betatim/codecov-for-gh-actions
[MRG] Experiment with different install mechanism to get code coverage stats again
2 parents 40f475f + 3e6f99c commit ac41c20

File tree

3 files changed

+24
-5
lines changed

3 files changed

+24
-5
lines changed

.codecov.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
# show coverage in CI status, not as a comment.
1+
# show coverage in CI status, not as a comment.
22
comment: off
3+
fixes:
4+
- "*/site-packages/::"
35
coverage:
46
status:
57
project:
68
default:
79
target: auto
810
patch:
911
default:
10-
target: 20%
12+
target: 20%

.coveragerc

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
11
[run]
22
# this file comes from versioneer and we don't test it
33
omit = */_version.py
4+
5+
[paths]
6+
# This tells coverage how to combine results together or said differently
7+
# which files at different paths are actually the same file
8+
# documented at https://coverage.readthedocs.io/en/latest/config.html#paths
9+
# Yes, we list repo2docker twice here. This allows you to install repo2docker
10+
# with `pip install -e.` for local development and from the wheel (as done on
11+
# CI) and get `repo2docker/foo.py` as paths in the coverage report
12+
source =
13+
repo2docker
14+
repo2docker
15+
../repo2docker
16+
*/site-packages/repo2docker

.github/workflows/test.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,11 @@ jobs:
114114
115115
- name: "Run tests"
116116
run: |
117-
pytest --durations 10 --cov repo2docker -v tests/${{ matrix.repo_type }}
117+
cd tests
118+
pytest --durations 10 --cov repo2docker -v ${{ matrix.repo_type }}
118119
119-
# Action Repo: https://github.com/codecov/codecov-action
120-
- uses: codecov/codecov-action@v1
120+
- name: "Upload code coverage stats"
121+
run: |
122+
pip install codecov
123+
pushd tests && codecov && cat
124+
cat /home/runner/work/repo2docker/repo2docker/tests/coverage.xml

0 commit comments

Comments
 (0)