@@ -2,32 +2,91 @@ name: Build
22
33on :
44 push :
5- branches : master
5+ branches : main
66 pull_request :
77 branches : ' *'
88
9+ concurrency :
10+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
11+ cancel-in-progress : true
12+
913jobs :
1014 build :
1115 runs-on : ubuntu-latest
16+
1217 steps :
1318 - name : Checkout
14- uses : actions/checkout@v2
15- - name : Install node
16- uses : actions/setup-node@v1
19+ uses : actions/checkout@v4
20+
21+ - name : Base Setup
22+ uses : jupyterlab/maintainer-tools/.github/actions/base-setup@v1
23+
24+ - name : Install dependencies
25+ run : python -m pip install -U "jupyterlab>=4.0.0,<5"
26+
27+ - name : Lint the extension
28+ run : |
29+ set -eux
30+ jlpm
31+ jlpm run lint:check
32+
33+ - name : Build the extension
34+ run : |
35+ set -eux
36+ python -m pip install .[test]
37+
38+ jupyter labextension list
39+ jupyter labextension list 2>&1 | grep -ie "jupyterlab-drawio.*OK"
40+ python -m jupyterlab.browser_check
41+
42+ - name : Package the extension
43+ run : |
44+ set -eux
45+
46+ pip install build
47+ python -m build
48+ pip uninstall -y "jupyterlab_drawio" jupyterlab
49+
50+ - name : Upload extension packages
51+ uses : actions/upload-artifact@v4
1752 with :
18- node-version : ' 10.x'
53+ name : extension-artifacts
54+ path : dist/jupyterlab_drawio*
55+ if-no-files-found : error
56+
57+ test_isolated :
58+ needs : build
59+ runs-on : ubuntu-latest
60+
61+ steps :
1962 - name : Install Python
20- uses : actions/setup-python@v2
63+ uses : actions/setup-python@v5
2164 with :
22- python-version : ' 3.7 '
65+ python-version : ' 3.9 '
2366 architecture : ' x64'
24- - name : Install dependencies
25- run : python -m pip install jupyterlab
26- - name : Build the extension
67+ - uses : actions/download-artifact@v4
68+ with :
69+ name : extension-artifacts
70+ - name : Install and Test
2771 run : |
28- jlpm
29- jlpm run eslint:check
30- python -m pip install .
72+ set -eux
73+ # Remove NodeJS, twice to take care of system and locally installed node versions.
74+ sudo rm -rf $(which node)
75+ sudo rm -rf $(which node)
76+
77+ pip install "jupyterlab>=4.0.0,<5" jupyterlab_drawio*.whl
3178
79+
80+ jupyter labextension list
3281 jupyter labextension list 2>&1 | grep -ie "jupyterlab-drawio.*OK"
33- python -m jupyterlab.browser_check
82+ python -m jupyterlab.browser_check --no-browser-test
83+
84+
85+ check_links :
86+ name : Check Links
87+ runs-on : ubuntu-latest
88+ timeout-minutes : 15
89+ steps :
90+ - uses : actions/checkout@v4
91+ - uses : jupyterlab/maintainer-tools/.github/actions/base-setup@v1
92+ - uses : jupyterlab/maintainer-tools/.github/actions/check-links@v1
0 commit comments