Skip to content

Commit afcc9c1

Browse files
committed
Try to execute codecov properly
1 parent 7b883b0 commit afcc9c1

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

appveyor.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ environment:
1010
- TOXENV: "coverage"
1111
# note: please use "tox --listenvs" to populate the build matrix below
1212
- TOXENV: "linting"
13+
PYTEST_NO_COVERAGE: "1"
1314
- TOXENV: "py27"
1415
- TOXENV: "py34"
1516
- TOXENV: "py35"
@@ -29,7 +30,9 @@ environment:
2930
- TOXENV: "py27-nobyte"
3031
- TOXENV: "doctesting"
3132
- TOXENV: "py36-freeze"
33+
PYTEST_NO_COVERAGE: "1"
3234
- TOXENV: "docs"
35+
PYTEST_NO_COVERAGE: "1"
3336

3437
install:
3538
- echo Installed Pythons
@@ -41,9 +44,25 @@ install:
4144

4245
build: false # Not a C# project, build stuff at the test step instead.
4346

47+
before_test:
48+
- |
49+
if not defined PYTEST_NO_COVERAGE (
50+
set "_PYTEST_TOX_COVERAGE_RUN=coverage run --source {envsitepackagesdir}/_pytest/,%CD%/testing -m"
51+
set "_PYTEST_TOX_EXTRA_DEP=coverage-enable-subprocess"
52+
)
53+
4454
test_script:
4555
- C:\Python36\python -m tox
4656

57+
on_success:
58+
- |
59+
if not defined PYTEST_NO_COVERAGE (
60+
C:\Python36\Scripts\pip install codecov
61+
C:\Python36\Scripts\coverage combine
62+
C:\Python36\Scripts\coverage report -m
63+
C:\Python36\Scripts\codecov
64+
)
65+
4766
cache:
4867
- '%LOCALAPPDATA%\pip\cache'
4968
- '%USERPROFILE%\.cache\pre-commit'

0 commit comments

Comments
 (0)