8000 [MRG+1] Adds codecov to windows on Azure (#13340) · scikit-learn/scikit-learn@984871b · GitHub
[go: up one dir, main page]

Skip to content
Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 984871b

Browse files
thomasjpfanogrisel
authored andcommitted
[MRG+1] Adds codecov to windows on Azure (#13340)
1 parent bf6949b commit 984871b

File tree

5 files changed

+26
-5
lines changed

5 files changed

+26
-5
lines changed

azure-pipelines.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
PYTHON_VERSION: '3.7'
6969
CHECK_WARNINGS: 'true'
7070
PYTHON_ARCH: '64'
71+
COVERAGE: 'true'
7172
py35_32:
7273
PYTHON_VERSION: '3.5'
7374
PYTHON_ARCH: '32'
74-

build_tools/azure/install.cmd

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ IF "%PYTHON_ARCH%"=="64" (
1717
) else (
1818
pip install numpy scipy cython pytest wheel pillow
1919
)
20-
python -m pip install -U pip
20+
if "%COVERAGE%" == "true" (
21+
pip install coverage codecov pytest-cov
22+
)
2123
python --version
2224
pip --version
2325

build_tools/azure/test_script.cmd

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1+
@echo on
2+
13
call activate %VIRTUALENV%
24

35
mkdir %TMP_FOLDER%
46
cd %TMP_FOLDER%
57

68
if "%CHECK_WARNINGS%" == "true" (
7-
pytest --junitxml=%JUNITXML% --showlocals --durations=20 -Werror::DeprecationWarning -Werror::FutureWarning --pyargs sklearn
8-
) else (
9-
pytest --junitxml=%JUNITXML% --showlocals --durations=20 --pyargs sklearn
9+
set PYTEST_ARGS=%PYTEST_ARGS% -Werror::DeprecationWarning -Werror::FutureWarning
10+
)
11+
12+
if "%COVERAGE%" == "true" (
13+
set PYTEST_ARGS=%PYTEST_ARGS% --cov sklearn
1014
)
15+
16+
pytest --junitxml=%JUNITXML% --showlocals --durations=20 %PYTEST_ARGS% --pyargs sklearn

build_tools/azure/upload_codecov.cmd

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@echo on
2+
3+
call activate %VIRTUALENV%
4+
5+
copy %TMP_FOLDER%\.coverage %BUILD_REPOSITORY_LOCALPATH%
6+
7+
codecov --root %BUILD_REPOSITORY_LOCALPATH% -t %CODECOV_TOKEN%

build_tools/azure/windows.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@ jobs:
3434
- script: |
3535
build_tools\\azure\\test_script.cmd
3636
displayName: 'Test Library'
37+
- script: |
38+
build_tools\\azure\\upload_codecov.cmd
39+
condition: and(succeeded(), eq(variables['COVERAGE'], 'true'))
40+
displayName: 'Upload To Codecov'
41+
env:
42+
CODECOV_TOKEN: $(CODECOV_TOKEN)
3743
- task: PublishTestResults@2
3844
inputs:
3945
testResultsFiles: '$(TMP_FOLDER)\$(JUNITXML)'

0 commit comments

Comments
 (0)
0