-
Notifications
You must be signed in to change notification settings - Fork 8
123 lines (117 loc) · 3.25 KB
/
build-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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
on:
pull_request:
branches:
- main
- 'release'
- 'release/*'
- 'release-*'
check_run:
types: [rerequested, requested_action]
push:
branches:
- main
- 'release'
- 'release/*'
- 'release-*'
workflow_dispatch:
env:
NODE_VERSION: 16.14.2
NPM_VERSION: 8.15.1
PYTHON_VERSION: '3.10'
jobs:
cancel_previous_runs:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node ${{env.NODE_VERSION}}
uses: actions/setup-node@v3
with:
node-version: ${{env.NODE_VERSION}}
- name: Use Npm ${{env.NPM_VERSION}}
run: npm i -g npm@${{env.NPM_VERSION}}
- run: npm i -g @vscode/vsce
- run: npm ci
- run: npm run package
- uses: actions/upload-artifact@v3
with:
name: 'ms-toolsai-jupyter-hub-insiders.vsix'
path: 'ms-toolsai-jupyter-hub-insiders.vsix'
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node ${{env.NODE_VERSION}}
uses: actions/setup-node@v3
with:
node-version: ${{env.NODE_VERSION}}
- name: Use Npm ${{env.NPM_VERSION}}
run: npm i -g npm@${{env.NPM_VERSION}}
- run: npm ci
- run: npm run lint
tests:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node ${{env.NODE_VERSION}}
uses: actions/setup-node@v3
with:
node-version: ${{env.NODE_VERSION}}
- name: Use Python ${{env.PYTHON_VERSION}}
uses: actions/setup-python@v4
with:
python-version: ${{env.PYTHON_VERSION}}
- name: Use Npm ${{env.NPM_VERSION}}
run: npm i -g npm@${{env.NPM_VERSION}}
- run: npm i -g @vscode/vsce
- run: npm ci
- run: npm run esbuild-base-node
- run: npm run test-compile
- run: python -m pip install jupyterhub jupyter-core jupyterlab
- run: npm i -g configurable-http-proxy
- run: xvfb-run -a npm test
if: runner.os == 'Linux'
# - run: npm test
# if: runner.os != 'Linux'
webtest:
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node ${{env.NODE_VERSION}}
uses: actions/setup-node@v3
with:
node-version: ${{env.NODE_VERSION}}
- name: Use Python ${{env.PYTHON_VERSION}}
uses: actions/setup-python@v4
with:
python-version: ${{env.PYTHON_VERSION}}
- name: Use Npm ${{env.NPM_VERSION}}
run: npm i -g npm@${{env.NPM_VERSION}}
- run: npm i -g @vscode/vsce
- run: npm ci
- run: npm run esbuild-base-web
- run: npm run test-compile
- run: npm run make-extension-pack-for-web-tests
- run: npm run test-compile-webpack
- run: python -m pip install jupyterhub jupyter-core jupyterlab
- run: npm i -g configurable-http-proxy
- run: xvfb-run -a npm run test:web:ci
if: runner.os == 'Linux'
# - run: npm test
# if: runner.os != 'Linux'