File tree Expand file tree Collapse file tree 3 files changed +27
-8
lines changed Expand file tree Collapse file tree 3 files changed +27
-8
lines changed Original file line number Diff line number Diff line change @@ -24,18 +24,20 @@ install:
2424 - echo Installed Pythons
2525 - dir c:\Python*
2626
27+ - set PATH=C:\Python36;C:\Python36\Scripts;%PATH%
28+
2729 - if "%TOXENV%" == "pypy" call scripts\install-pypy.bat
2830
29- - C:\Python36\ python -m pip install --upgrade pip
30- - C:\Python36\ python -m pip install --upgrade --pre tox
31+ - python -m pip install --upgrade pip
32+ - python -m pip install --upgrade --pre tox
3133
3234build : false # Not a C# project, build stuff at the test step instead.
3335
3436before_test :
3537 - call scripts\prepare-coverage.bat
3638
3739test_script :
38- - C:\Python36\ python -m tox
40+ - python -m tox
3941
4042on_success :
4143 - call scripts\upload-coverage.bat
Original file line number Diff line number Diff line change @@ -6,6 +6,10 @@ variables:
66 PYTEST_ADDOPTS : " --junitxml=build/test-results/$(tox.env).xml"
77 python.needs_vc : False
88 python.exe : " python"
9+ COVERAGE_FILE : " $(Build.Repository.LocalPath)/.coverage"
10+ COVERAGE_PROCESS_START : " $(Build.Repository.LocalPath)/.coveragerc"
11+ _PYTEST_TOX_COVERAGE_RUN : " coverage run -m"
12+ _PYTEST_TOX_EXTRA_DEP : " coverage-enable-subprocess"
913
1014jobs :
1115
6771 versionSpec : ' $(python.version)'
6872 architecture : ' x64'
6973
74+ - script : echo %COVERAGE_FILE%
75+ displayName : ' test'
76+
7077 - script : choco install vcpython27
7178 condition : eq(variables['python.needs_vc'], True)
7279 displayName : ' Install VC for py27'
99106 testResultsFiles : ' build/test-results/$(tox.env).xml'
100107 testRunTitle : ' $(tox.env)'
101108 condition : succeededOrFailed()
109+
110+ - script : call scripts\upload-coverage.bat
111+ displayName : ' Upload coverage'
112+ env :
113+ CODECOV_TOKEN : $(CODECOV_TOKEN)
Original file line number Diff line number Diff line change 11REM script called by AppVeyor to combine and upload coverage information to codecov
22if not defined PYTEST_NO_COVERAGE (
33 echo Prepare to upload coverage information
4- C:\Python36\Scripts\pip install codecov
5- C:\Python36\Scripts\coverage combine
6- C:\Python36\Scripts\coverage xml --ignore-errors
7- C:\Python36\Scripts\coverage report -m --ignore-errors
8- scripts\appveyor-retry C:\Python36\Scripts\codecov --required -X gcov pycov search -f coverage.xml --flags windows
4+ if defined CODECOV_TOKEN (
5+ echo CODECOV_TOKEN defined
6+ ) else (
7+ echo CODECOV_TOKEN NOT defined
8+ )
9+ python -m pip install codecov
10+ coverage combine
11+ coverage xml --ignore-errors
12+ coverage report -m --ignore-errors
13+ scripts\appveyor-retry codecov --required -X gcov pycov search -f coverage.xml --flags windows
914) else (
1015 echo Skipping coverage upload, PYTEST_NO_COVERAGE is set
1116)
You can’t perform that action at this time.
0 commit comments