Skip to content

Commit e711a6c

Browse files
authored
Merge pull request #4841 from blueyed/coverage-source
coverage: use run.include, remove --ignore-errors, send TOXENV as name to codecov
2 parents c1e3128 + ee95d66 commit e711a6c

File tree

4 files changed

+14
-7
lines changed

4 files changed

+14
-7
lines changed

.coveragerc

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
[run]
2-
source = pytest,_pytest,testing/
2+
include =
3+
src/*
4+
testing/*
5+
.tox/*/lib/python*/site-packages/_pytest/*
6+
.tox/*/lib/python*/site-packages/pytest.py
7+
.tox\*\Lib\site-packages\_pytest\*
8+
.tox\*\Lib\site-packages\pytest.py
39
parallel = 1
410
branch = 1
511

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ after_success:
103103
# Add last TOXENV to $PATH.
104104
PATH="$PWD/.tox/${TOXENV##*,}/bin:$PATH"
105105
coverage combine
106-
coverage xml --ignore-errors
107-
coverage report -m --ignore-errors
108-
bash <(curl -s https://codecov.io/bash) -Z -X gcov -X coveragepy -X search -X xcode -X gcovout -X fix -f coverage.xml -F $TRAVIS_OS_NAME
106+
coverage xml
107+
coverage report -m
108+
bash <(curl -s https://codecov.io/bash) -Z -X gcov -X coveragepy -X search -X xcode -X gcovout -X fix -f coverage.xml -F $TRAVIS_OS_NAME -n $TOXENV
109109
fi
110110
111111
notifications:

azure-pipelines.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,4 @@ jobs:
120120
condition: eq(variables['PYTEST_COVERAGE'], '1')
121121
env:
122122
CODECOV_TOKEN: $(CODECOV_TOKEN)
123+
PYTEST_CODECOV_NAME: $(tox.env)

scripts/upload-coverage.bat

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ if "%PYTEST_COVERAGE%" == "1" (
88
)
99
python -m pip install codecov
1010
coverage combine
11-
coverage xml --ignore-errors
12-
coverage report -m --ignore-errors
13-
scripts\retry codecov --required -X gcov pycov search -f coverage.xml --flags windows
11+
coverage xml
12+
coverage report -m
13+
scripts\retry codecov --required -X gcov pycov search -f coverage.xml --flags windows --name %PYTEST_CODECOV_NAME%
1414
) else (
1515
echo Skipping coverage upload, PYTEST_COVERAGE=%PYTEST_COVERAGE%
1616
)

0 commit comments

Comments
 (0)