-
-
Notifications
You must be signed in to change notification settings - Fork 25.6k
/
Copy pathwindows.yml
85 lines (80 loc) · 3.03 KB
/
windows.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
parameters:
name: ''
vmImage: ''
matrix: []
dependsOn: []
condition: ne(variables['Build.Reason'], 'Schedule')
jobs:
- job: ${{ parameters.name }}
dependsOn: ${{ parameters.dependsOn }}
condition: ${{ parameters.condition }}
pool:
vmImage: ${{ parameters.vmImage }}
variables:
VIRTUALENV: 'testvenv'
JUNITXML: 'test-data.xml'
SKLEARN_SKIP_NETWORK_TESTS: '1'
PYTEST_XDIST_VERSION: 'latest'
TEST_DIR: '$(Agent.WorkFolder)/tmp_folder'
SHOW_SHORT_SUMMARY: 'false'
strategy:
matrix:
${{ insert }}: ${{ parameters.matrix }}
steps:
- bash: python build_tools/azure/get_selected_tests.py
displayName: Check selected tests for all random seeds
condition: eq(variables['Build.Reason'], 'PullRequest')
- bash: echo "##vso[task.prependpath]$CONDA/Scripts"
displayName: Add conda to PATH
condition: startsWith(variables['DISTRIB'], 'conda')
- task: UsePythonVersion@0
inputs:
versionSpec: '$(PYTHON_VERSION)'
addToPath: true
architecture: 'x86'
displayName: Use 32 bit System Python
condition: and(succeeded(), eq(variables['PYTHON_ARCH'], '32'))
- bash: ./build_tools/azure/install.sh
displayName: 'Install'
- bash: ./build_tools/azure/test_script.sh
displayName: 'Test Library'
- bash: ./build_tools/azure/combine_coverage_reports.sh
condition: and(succeeded(), eq(variables['COVERAGE'], 'true'),
eq(variables['SELECTED_TESTS'], ''))
displayName: 'Combine coverage'
- task: PublishTestResults@2
inputs:
testResultsFiles: '$(TEST_DIR)/$(JUNITXML)'
testRunTitle: ${{ format('{0}-$(Agent.JobName)', parameters.name) }}
displayName: 'Publish Test Results'
condition: succeededOrFailed()
- bash: |
set -ex
if [[ $(BOT_GITHUB_TOKEN) == "" ]]; then
echo "GitHub Token is not set. Issue tracker will not be updated."
exit
fi
LINK_TO_RUN="https://dev.azure.com/$BUILD_REPOSITORY_NAME/_build/results?buildId=$BUILD_BUILDID&view=logs&j=$SYSTEM_JOBID"
CI_NAME="$SYSTEM_JOBIDENTIFIER"
ISSUE_REPO="$BUILD_REPOSITORY_NAME"
$(pyTools.pythonLocation)/bin/pip install defusedxml PyGithub
$(pyTools.pythonLocation)/bin/python maint_tools/update_tracking_issue.py \
$(BOT_GITHUB_TOKEN) \
$CI_NAME \
$ISSUE_REPO \
$LINK_TO_RUN \
--junit-file $JUNIT_FILE \
--auto-close false
displayName: 'Update issue tracker'
env:
JUNIT_FILE: $(TEST_DIR)/$(JUNITXML)
condition: and(succeededOrFailed(), eq(variables['CREATE_ISSUE_ON_TRACKER'], 'true'),
eq(variables['Build.Reason'], 'Schedule'))
- bash: ./build_tools/azure/upload_codecov.sh
condition: and(succeeded(),
eq(variables['COVERAGE'], 'true'),
eq(variables['SELECTED_TESTS'], ''))
displayName: 'Upload To Codecov'
retryCountOnTaskFailure: 5
env:
CODECOV_TOKEN: $(CODECOV_TOKEN)