2
2
3
3
on :
4
4
push :
5
- branches : master
5
+ branches :
6
+ - master
7
+ - develop
6
8
pull_request :
7
9
branches : ' *'
8
10
@@ -15,31 +17,31 @@ jobs:
15
17
runs-on : ${{ matrix.os }}-latest
16
18
strategy :
17
19
matrix :
18
- os : [" ubuntu" ]
19
- python-version : ["3.9" ]
20
- node-version : ["14.x" ]
21
- lab-version : ["3" ]
20
+ os : [' ubuntu' ]
21
+ python-version : ['3.10' ]
22
+ node-version : ['16.x' ]
23
+ lab-version : ['3.3' ]
22
24
steps :
23
25
- name : Checkout
24
- uses : actions/checkout@v1
26
+ uses : actions/checkout@v3
25
27
26
28
- name : Select Node ${{ matrix.node-version }}
27
- uses : actions/setup-node@v1
29
+ uses : actions/setup-node@v2
28
30
with :
29
31
node-version : ${{ matrix.node-version }}
30
32
31
33
- name : Select Python ${{ matrix.python-version }}
32
- uses : actions/setup-python@v1
34
+ uses : actions/setup-python@v3
33
35
with :
34
36
python-version : ${{ matrix.python-version }}
35
37
architecture : ' x64'
36
38
37
39
- name : Cache (Python)
38
- uses : actions/cache@v2
40
+ uses : actions/cache@v3
39
41
with :
40
42
path : ~/.cache/pip
41
43
key : |
42
- ${{ env.CACHE_EPOCH }}-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.lab-version }}-pip-build-${{ hashFiles('setup.py') }}
44
+ ${{ env.CACHE_EPOCH }}-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.lab-version }}-pip-build-${{ hashFiles('setup.py', 'setup.cfg' ) }}
43
45
restore-keys : |
44
46
${{ env.CACHE_EPOCH }}-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.lab-version }}-pip-build-
45
47
56
58
pip3 check
57
59
58
60
- name : Cache (JS)
59
- uses : actions/cache@v2
61
+ uses : actions/cache@v3
60
62
with :
61
63
path : ' **/node_modules'
62
64
key : |
67
69
- name : Install JS dependencies
68
70
run : jlpm --ignore-optional --frozen-lockfile
69
71
70
- - name : Lint Lab Extension, etc.
71
- run : jlpm run lint:check
72
-
73
72
- name : Build npm tarball
74
73
run : |
75
74
set -eux
@@ -87,27 +86,105 @@ jobs:
87
86
sha256sum * | tee SHA256SUMS
88
87
89
88
- name : Upload distributions
90
- uses : actions/upload-artifact@v2
89
+ uses : actions/upload-artifact@v3
91
90
with :
92
91
name : jupyter-videochat ${{ github.run_number }} dist
93
92
path : ./dist
94
93
94
+ - name : Upload labextension
95
+ uses : actions/upload-artifact@v3
96
+ with :
97
+ name : jupyter-videochat ${{ github.run_number }} labextension
98
+ path : ./jupyter_videochat/labextension
99
+
100
+ lint :
101
+ needs : [build]
102
+ name : lint
103
+ runs-on : ${{ matrix.os }}-latest
104
+ strategy :
105
+ matrix :
106
+ os : ['ubuntu']
107
+ python-version : ['3.10']
108
+ node-version : ['16.x']
109
+ lab-version : ['3.3']
110
+ steps :
111
+ - name : Checkout
112
+ uses : actions/checkout@v3
113
+
114
+ - name : Select Node ${{ matrix.node-version }}
115
+ uses : actions/setup-node@v2
116
+ with :
117
+ node-version : ${{ matrix.node-version }}
118
+
119
+ - name : Select Python ${{ matrix.python-version }}
120
+ uses : actions/setup-python@v3
121
+ with :
122
+ python-version : ${{ matrix.python-version }}
123
+ architecture : ' x64'
124
+
125
+ - name : Cache (Python)
126
+ uses : actions/cache@v3
127
+ with :
128
+ path : ~/.cache/pip
129
+ key : |
130
+ ${{ env.CACHE_EPOCH }}-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.lab-version }}-pip-lint-${{ hashFiles('setup.cfg') }}
131
+ restore-keys : |
132
+ ${{ env.CACHE_EPOCH }}-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.lab-version }}-pip-lint-
133
+
134
+ - name : Install Python packaging dependencies
135
+ run : pip3 install -U --user pip wheel setuptools
136
+
137
+ - name : Install Python dev dependencies
138
+ run : pip3 install "jupyterlab==${{ matrix.lab-version }}.*"
139
+
140
+ - name : Cache (JS)
141
+ uses : actions/cache@v3
142
+ with :
143
+ path : ' **/node_modules'
144
+ key : |
145
+ ${{ env.CACHE_EPOCH }}-${{ runner.os }}-${{ matrix.node-version }}-${{ matrix.lab-version }}-node-build-${{ hashFiles('yarn.lock') }}
146
+ restore-keys : |
147
+ ${{ env.CACHE_EPOCH }}-${{ runner.os }}-${{ matrix.node-version }}-${{ matrix.lab-version }}-node-build-
148
+
149
+ - name : Install JS dependencies
150
+ run : jlpm --ignore-optional --frozen-lockfile
151
+
152
+ - name : Download built labextension
153
+ uses : actions/download-artifact@v3
154
+ with :
155
+ name : jupyter-videochat ${{ github.run_number }} labextension
156
+ path : ./jupyter_videochat/labextension
157
+
158
+ - name : Python Dev Install
159
+ run : |
160
+ set -eux
161
+ pip3 install -e .[lint]
162
+
163
+ - name : Lint Lab Extension, etc.
164
+ run : jlpm run lint:check
165
+
166
+ - name : Lint Python
167
+ run : |-
168
+ isort --check setup.py docs jupyter_videochat
169
+ black --check setup.py docs jupyter_videochat
170
+
95
171
test :
96
172
needs : [build]
97
173
name : test ${{ matrix.os }} py${{ matrix.python-version }}
98
174
runs-on : ${{ matrix.os }}-latest
99
175
strategy :
100
176
# fail-fast: false
101
177
matrix :
102
- python-version : ["3.6", "3.9"]
103
- os : ["ubuntu", "windows", "macos"]
104
- lab-version : ["3"]
178
+ python-version : ['3.7', '3.10']
179
+ os : ['ubuntu', 'windows', 'macos']
105
180
include :
106
181
# use python as marker for node/distribution test coverage
107
- - python-version : " 3.6"
108
- artifact-glob : " *.tar.gz"
109
- - python-version : " 3.9"
110
- artifact-glob : " *.whl"
182
+ - python-version : ' 3.7'
183
+ artifact-glob : ' *.tar.gz'
184
+ lab-version : ' 3.0'
185
+ - python-version : ' 3.10'
186
+ artifact-glob : ' *.whl'
187
+ lab-version : ' 3.3'
111
188
# os-specific settings
112
189
- os : windows
113
190
python-cmd : python
@@ -123,70 +200,82 @@ jobs:
123
200
run :
124
201
shell : bash -l {0}
125
202
steps :
126
- - name : Checkout
127
- uses : actions/checkout@v1
128
-
129
- - name : Select Python ${{ matrix.python-version }}
130
- uses : actions/setup-python@v1
131
- with :
132
- python-version : ${{ matrix.python-version }}
133
- architecture : ' x64'
134
-
135
- - name : Cache (Python)
136
- uses : actions/cache@v2
137
- with :
138
- path : ${{ matrix.pip-cache }}
139
- key : |
140
- ${{ env.CACHE_EPOCH }}-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.lab-version }}-pip-test-${{ hashFiles('setup.py') }}
141
- restore-keys : |
142
- ${{ env.CACHE_EPOCH }}-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.lab-version }}-pip-test-
143
-
144
- - name : Install Python packaging dependencies
145
- run : |
146
- set -eux
147
- pip3 install -U --user pip wheel setuptools
148
-
149
- - name : Download distributions
150
- uses : actions/download-artifact@v2
151
- with :
152
- name : jupyter-videochat ${{ github.run_number }} dist
153
- path : ./dist
154
-
155
- - name : Install Python distribution
156
- run : |
157
- set -eux
158
- cd dist
159
- pip3 install -v ${{ matrix.artifact-glob }}
160
-
161
- - name : Validate Python environment
162
- run :
163
- set -eux
164
- pip3 freeze | tee .pip-frozen
165
- pip3 check
166
-
167
- - name : Import smoke test
168
- run : |
169
- set -eux
170
- cd dist
171
- ${{ matrix.python-cmd }} -c "import jupyter_videochat; print(jupyter_videochat.__version__)"
172
-
173
- - name : Validate Server Extension (server)
174
- run : |
175
- set -eux
176
- jupyter server extension list --debug 1>serverextensions 2>&1
177
- cat serverextensions
178
- cat serverextensions | grep -i "jupyter_videochat.*OK"
179
-
180
- - name : Validate Server Extension (notebook)
181
- run : |
182
- set -eux
183
- jupyter serverextension list --debug 1>server_extensions 2>&1
184
- cat server_extensions
185
- cat server_extensions | grep -i "jupyter_videochat.*OK"
186
-
187
- - name : Validate Lab Extension
188
- run : |
189
- set -eux
190
- jupyter labextension list --debug 1>labextensions 2>&1
191
- cat labextensions
192
- cat labextensions | grep -i "jupyterlab-videochat.*OK"
203
+ - name : Checkout
204
+ uses : actions/checkout@v3
205
+
206
+ - name : Select Python ${{ matrix.python-version }}
207
+ uses : actions/setup-python@v3
208
+ with :
209
+ python-version : ${{ matrix.python-version }}
210
+ architecture : ' x64'
211
+
212
+ - name : Cache (Python)
213
+ uses : actions/cache@v3
214
+ with :
215
+ path : ${{ matrix.pip-cache }}
216
+ key : |
217
+ ${{ env.CACHE_EPOCH }}-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.lab-version }}-pip-test-${{ hashFiles('setup.py', 'setup.cfg') }}
218
+ restore-keys : |
219
+ ${{ env.CACHE_EPOCH }}-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.lab-version }}-pip-test-
220
+
221
+ - name : Install Python packaging dependencies
222
+ run : |
223
+ set -eux
224
+ pip3 install -U --user pip wheel setuptools
225
+
226
+ - name : Download distributions
227
+ uses : actions/download-artifact@v3
228
+ with :
229
+ name : jupyter-videochat ${{ github.run_number }} dist
230
+ path : ./dist
231
+
232
+ - name : Install Python distribution
233
+ run : |
234
+ set -eux
235
+ cd dist
236
+ pip3 install -v ${{ matrix.artifact-glob }} "jupyterlab==${{ matrix.lab-version }}.*" notebook
237
+
238
+ - name : Validate Python environment
239
+ run : set -eux pip3 freeze | tee .pip-frozen pip3 check
240
+
241
+ - name : Import smoke test
242
+ run : |
243
+ set -eux
244
+ cd dist
245
+ ${{ matrix.python-cmd }} -c "import jupyter_videochat; print(jupyter_videochat.__version__)"
246
+
247
+ - name : Validate Server Extension (server)
248
+ run : |
249
+ set -eux
250
+ jupyter server extension list --debug 1>serverextensions 2>&1
251
+ cat serverextensions
252
+ cat serverextensions | grep -i "jupyter_videochat.*OK"
253
+
254
+ - name : Validate Server Extension (notebook)
255
+ run : |
256
+ set -eux
257
+ jupyter serverextension list --debug 1>server_extensions 2>&1
258
+ cat server_extensions
259
+ cat server_extensions | grep -i "jupyter_videochat.*OK"
260
+
261
+ - name : Validate Lab Extension
262
+ run : |
263
+ set -eux
264
+ jupyter labextension list --debug 1>labextensions 2>&1
265
+ cat labextensions
266
+ cat labextensions | grep -i "jupyterlab-videochat.*OK"
267
+
268
+ - name : Install (docs)
269
+ if : matrix.python-version == '3.10' && matrix.os == 'ubuntu'
270
+ run : pip install -r docs/requirements.txt
271
+
272
+ - name : Build (docs)
273
+ if : matrix.python-version == '3.10' && matrix.os == 'ubuntu'
274
+ env :
275
+ DOCS_IN_CI : 1
276
+ run : sphinx-build -W -b html docs docs/_build
277
+
278
+ - name : Check (links)
279
+ if : matrix.python-version == '3.10' && matrix.os == 'ubuntu'
280
+ run : |
281
+ pytest-check-links docs/_build -p no:warnings --links-ext=html --check-anchors --check-links-ignore "^https?://"
0 commit comments