-
Notifications
You must be signed in to change notification settings - Fork 8
/
job.test.yml
101 lines (82 loc) · 4.49 KB
/
job.test.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
parameters:
platforms:
- name: Linux
vmImage: ubuntu-16.04
activate: source activate
- name: MacOSX
vmImage: macos-10.14
activate: source activate
- name: Windows
vmImage: vs2017-win2016
activate: call activate
pythons:
- name: ThreeSix
spec: '>=3.6,<3.7.0a0'
lab: '>=2,<2.1.0a0'
- name: ThreeSeven
spec: '>=3.7,<3.8.0a0'
lab: '>=2.1,<2.2.0a0'
- name: ThreeEight
spec: '>=3.8,<3.9.0a0'
lab: '>=2,<3.0.0a0'
env_update: conda env update -n jupyterlab-starters --file env-test.yml --quiet
lab_ext: jupyter labextension install --no-build $(FIRST_PARTY_LABEXTENSIONS)
link_mod: jupyter labextension link --no-build $(FIRST_PARTY_MODULES)
jlpm: jlpm --ignore-optional --prefer-offline --frozen-lockfile
jobs:
- ${{ each platform in parameters.platforms }}:
- ${{ each python in parameters.pythons}}:
- job: ${{ platform.name }}${{ python.name }}
dependsOn:
- Lint
pool:
vmImage: ${{ platform.vmImage }}
steps:
- template: steps.conda.yml
parameters:
name: ${{ platform.name }}
- script: ${{ platform.activate }} && cd ci && python env_template.py "${{ python.spec }}" "${{ python.lab }}"
displayName: update environment with python and lab version
- script: ${{ parameters.env_update }} || ${{ parameters.env_update }} || ${{ parameters.env_update }}
displayName: update conda environment with test dependencies
- script: conda info && conda list -n jupyterlab-starters
displayName: list conda packages and info
- script: ${{ platform.activate }} jupyterlab-starters && ${{ parameters.jlpm }} || ${{ parameters.jlpm }} || ${{ parameters.jlpm }}
displayName: install npm dependencies
- script: ${{ platform.activate }} jupyterlab-starters && jlpm build
displayName: build typescript
- script: ${{ platform.activate }} jupyterlab-starters && python setup.py sdist bdist_wheel
displayName: build python distributions
- script: ${{ platform.activate }} jupyterlab-starters && jlpm lerna run bundle
displayName: build npm bundles
- script: ${{ platform.activate }} jupyterlab-starters && cd dist && python -m pip install jupyter_starters-$(PY_JLST_VERSION)-py3-none-any.whl --no-deps
displayName: install python wheel
- script: ${{ platform.activate }} jupyterlab-starters && python scripts/utest.py
displayName: run unit tests
- script: ${{ platform.activate }} jupyterlab-starters && jupyter serverextension list
displayName: list server extensions
- script: ${{ platform.activate }} jupyterlab-starters && ${{ parameters.link_mod }} || ${{ parameters.link_mod }} || ${{ parameters.link_mod }}
displayName: link modules
- script: ${{ platform.activate }} jupyterlab-starters && ${{ parameters.lab_ext }} || ${{ parameters.lab_ext }} || ${{ parameters.lab_ext }}
displayName: install labextensions
- script: ${{ platform.activate }} jupyterlab-starters && jupyter lab build || jupyter lab build --debug || jupyter lab build --debug
displayName: build lab
- script: ${{ platform.activate }} jupyterlab-starters && jupyter labextension list
displayName: list labextensions
- script: ${{ platform.activate }} jupyterlab-starters && conda remove --yes --force nodejs
displayName: uninstall node to avoid build checks
- script: ${{ platform.activate }} jupyterlab-starters && python scripts/atest.py
displayName: run browser tests
- task: PublishTestResults@2
displayName: publish browser test results
inputs:
testResultsFiles: atest/output/*.xunit.xml
testRunTitle: 'Robot ${{ platform.name }}${{ python.name }}'
mergeTestResults: true
condition: always()
- task: PublishPipelineArtifact@0
displayName: publish browser test output
inputs:
targetPath: atest/output
artifactName: Robot ${{ platform.name }}${{ python.name }} $(Build.BuildId)
condition: always()