forked from AlbertDeFusco/jupyter-fs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
265 lines (220 loc) · 6.38 KB
/
azure-pipelines.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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
trigger:
branches:
include:
- '*' # must quote since '*' is a YAML reserved character; we want a string
parameters:
- name: initSteps
type: stepList
default:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'
- task: NodeTool@0
inputs:
versionSpec: '12.x'
- bash: npm install -g yarn
displayName: 'Install Yarn'
- bash: env
displayName: 'List all environment variables'
- bash: pip install --upgrade pip wheel setuptools jupyterlab
displayName: 'Install Python base dependencies'
- bash: |
set -ex
which python
python --version
pip list
displayName: 'Python info'
- name: fixGethostnameMacSteps
type: stepList
default:
- script: |
ci/enable_sharing_mac.sh
ci/add_etc_hosts.sh
displayName: 'Fix socket.gethostname() in python on mac'
- name: initDockerSteps
type: stepList
default:
- task: DockerInstaller@0
inputs:
dockerVersion: 19.03.8
releaseType: stable
displayName: 'Setup docker'
- name: initDockerMacSteps
type: stepList
default:
- script: |
ci/install_docker_desktop_mac.sh
ci/start_docker_desktop_mac.sh
displayName: 'Setup docker desktop for mac'
- name: pullContainersSteps
type: stepList
default:
- script: |
docker pull andrewgaul/s3proxy
docker pull dperson/samba
displayName: 'Pull containers used by tests'
- name: initS3proxyLocalSteps
type: stepList
default:
- bash: |
nohup ci/s3_local.sh -d -r
sleep 5
displayName: 'Start up local S3 server'
- script: curl http://127.0.0.1:9000/
displayName: 'Test local S3 server'
- name: initSmbOsWindowsSteps
type: stepList
default:
- task: PowerShell@2
inputs:
targetType: 'filePath'
filePath: 'ci/enable_os_share_windows.ps1'
errorActionPreference: 'stop'
failOnStderr: True
displayName: 'Enable os builtin file sharing'
- task: PowerShell@2
inputs:
targetType: 'filePath'
filePath: 'ci/create_os_share_windows.ps1'
errorActionPreference: 'stop'
failOnStderr: True
displayName: 'Create share on os builtin samba server'
- name: lintSteps
type: stepList
default:
- script: cd js; yarn install
displayName: 'Install Javascript lint deps'
- script: make lintjs YARN=yarn
displayName: 'Lint JS'
- bash: pip install black flake8 flake8-black
displayName: 'Install Python lint deps'
- script: make lintpy
displayName: 'Lint Python'
- name: testPythonSteps
type: stepList
default:
- bash: pip install --upgrade -e .[dev] -v
displayName: 'Dev install of serverextension'
- script: make testpy
displayName: 'Test the Python serverextension backend'
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testResultsFiles: 'python_junit.xml'
testRunTitle: 'Publish test results for Python $(python.version) $(manylinux_flag)'
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/*coverage.xml'
- name: testJavascriptSteps
type: stepList
default:
- script: make js YARN=yarn
displayName: 'Build the labextension'
- script: make testjs YARN=yarn
displayName: 'Run the Jest tests'
# TODO: remove `python -m pip install --pre -U jupyterlab` line below once jlab 3.1.0 drops
- name: testBrowserSteps
type: stepList
default:
- bash: |
set -ex
python -m pip install --pre -U jupyterlab
python -m pip install -U . -v
displayName: 'Standard jupyter-fs install'
- bash: |
set -ex
jupyter --paths
jupyter lab paths
jupyter serverextension list
jupyter labextension list
displayName: 'List Jupyter server/labextensions'
- script: cd js; yarn test:browser
displayName: 'Run JupyterLab browser check'
jobs:
- job: 'integrity__linux'
pool:
vmImage: 'ubuntu-latest'
variables:
python.version: '3.7'
steps:
- ${{ parameters.initSteps }}
- ${{ parameters.lintSteps }}
- job: 'javascript__linux'
pool:
vmImage: 'ubuntu-latest'
variables:
python.version: '3.7'
steps:
- ${{ parameters.initSteps }}
- ${{ parameters.testJavascriptSteps }}
- job: 'browser_check__linux'
pool:
vmImage: 'ubuntu-latest'
variables:
python.version: '3.7'
steps:
- ${{ parameters.initDockerSteps }}
- ${{ parameters.pullContainersSteps }}
- ${{ parameters.initSteps }}
- ${{ parameters.testBrowserSteps }}
- job: 'python__linux'
pool:
vmImage: 'ubuntu-latest'
variables:
python.version: '3.7'
steps:
- ${{ parameters.initDockerSteps }}
- ${{ parameters.pullContainersSteps }}
- ${{ parameters.initSteps }}
- ${{ parameters.testPythonSteps }}
- job: 'python__mac'
pool:
vmImage: 'macOS-latest'
variables:
python.version: '3.7'
steps:
- ${{ parameters.initDockerMacSteps }}
- ${{ parameters.pullContainersSteps }}
- ${{ parameters.initSteps }}
- ${{ parameters.testPythonSteps }}
# TODO: delete this duplicate job, once the required test has been renamed on github: "Linux Python37" => "python__linux"
- job: 'Linux'
pool:
vmImage: 'ubuntu-latest'
strategy:
matrix:
Python37:
python.version: '3.7'
steps:
- ${{ parameters.initDockerSteps }}
- ${{ parameters.pullContainersSteps }}
- ${{ parameters.initSteps }}
- ${{ parameters.testPythonSteps }}
# TODO: delete this duplicate job, once the required test has been renamed on github: "Mac Python37" => "python__mac"
- job: 'Mac'
pool:
vmImage: 'macOS-latest'
strategy:
matrix:
Python37:
python.version: '3.7'
steps:
- ${{ parameters.initDockerMacSteps }}
- ${{ parameters.pullContainersSteps }}
- ${{ parameters.initSteps }}
- ${{ parameters.testPythonSteps }}
# - job: 'Windows'
# pool:
# vmImage: 'windows-2019'
# strategy:
# matrix:
# Python37:
# python.version: '3.7'
# steps:
# - ${{ parameters.initSmbOsWindowsSteps }}
# - ${{ parameters.initS3proxyLocalSteps }}
# - ${{ parameters.initSteps }}
# - ${{ parameters.testSteps }}
# - ${{ parameters.publishSteps }}