6
6
pull_request :
7
7
branches : ' *'
8
8
9
+ defaults :
10
+ run :
11
+ shell : bash -el {0}
12
+
9
13
jobs :
10
14
build :
15
+ name : Build and test
11
16
runs-on : ubuntu-latest
12
17
13
18
steps :
14
19
- name : Checkout
15
- uses : actions/checkout@v3
16
-
17
- - name : Base Setup
18
- uses : jupyterlab/maintainer-tools/.github/actions/base-setup@v1
20
+ uses : actions/checkout@v4
19
21
20
- - name : Install dependencies
21
- run : |
22
- python -m pip install -U "jupyterlab>=4.0.0,<5"
23
- python -m pip install hatch-jupyter-builder
22
+ - name : Set up environment
23
+ uses : mamba-org/setup-micromamba@v1
24
+ with :
25
+ environment-name : urdf
26
+ init-shell : bash
27
+ create-args : >-
28
+ python
29
+ python-build
30
+ jupyterlab>=4.0
31
+ hatch-jupyter-builder
32
+ nodejs
24
33
25
34
- name : Lint the extension
26
35
run : |
27
- set -eux
28
36
jlpm
29
37
jlpm run lint:check
38
+
30
39
- name : Test the extension
31
- run : |
32
- set -eux
33
- jlpm run test
40
+ run : jlpm run test
34
41
35
42
- name : Build the extension
36
43
run : |
37
- set -eux
38
44
python -m pip install .[test]
39
-
40
45
jupyter labextension list
41
46
jupyter labextension list 2>&1 | grep -ie "jupyterlab-urdf.*OK"
42
47
python -m jupyterlab.browser_check
43
48
44
49
- name : Package the extension
45
50
run : |
46
- set -eux
47
-
48
- pip install build
49
51
python -m build
50
52
pip uninstall -y "jupyterlab_urdf" jupyterlab
51
53
52
54
- name : Upload extension packages
53
- uses : actions/upload-artifact@v3
55
+ uses : actions/upload-artifact@v4
54
56
with :
55
57
name : extension-artifacts
56
58
path : dist/jupyterlab_urdf*
57
59
if-no-files-found : error
58
60
59
- test_isolated :
61
+ test-isolated :
62
+ name : Isolated tests
60
63
needs : build
61
64
runs-on : ubuntu-latest
62
65
63
66
steps :
64
67
- name : Checkout
65
- uses : actions/checkout@v3
66
- - name : Install Python
67
- uses : actions/setup-python@v4
68
+ uses : actions/checkout@v4
69
+
70
+ - name : Set up environment
71
+ uses : mamba-org/setup-micromamba@v1
68
72
with :
69
- python-version : ' 3.9'
70
- architecture : ' x64'
71
- - uses : actions/download-artifact@v3
73
+ environment-name : urdf-isolated
74
+ init-shell : bash
75
+ create-args : >-
76
+ python
77
+ jupyterlab>=4.0
78
+
79
+ - name : Download extension package
80
+ uses : actions/download-artifact@v4
72
81
with :
73
82
name : extension-artifacts
74
- - name : Install and Test
75
- run : |
76
- set -eux
77
- # Remove NodeJS, twice to take care of system and locally installed node versions.
78
- sudo rm -rf $(which node)
79
- sudo rm -rf $(which node)
80
-
81
- pip install "jupyterlab>=4.0.0,<5" jupyterlab_urdf*.whl
82
-
83
83
84
+ - name : Install and test
85
+ run : |
86
+ pip install jupyterlab_urdf*.whl
84
87
jupyter labextension list
85
88
jupyter labextension list 2>&1 | grep -ie "jupyterlab-urdf.*OK"
86
89
python -m jupyterlab.browser_check --no-browser-test
87
90
88
- integration-tests :
91
+ test-integration :
89
92
name : Integration tests
90
93
needs : build
91
94
runs-on : ubuntu-latest
@@ -95,20 +98,25 @@ jobs:
95
98
96
99
steps :
97
100
- name : Checkout
98
- uses : actions/checkout@v3
101
+ uses : actions/checkout@v4
99
102
100
- - name : Base Setup
101
- uses : jupyterlab/maintainer-tools/.github/actions/base-setup@v1
103
+ - name : Set up environment
104
+ uses : mamba-org/setup-micromamba@v1
105
+ with :
106
+ environment-name : urdf-integration
107
+ init-shell : bash
108
+ create-args : >-
109
+ python
110
+ jupyterlab==4.0.3
102
111
103
112
- name : Download extension package
104
- uses : actions/download-artifact@v3
113
+ uses : actions/download-artifact@v4
105
114
with :
106
115
name : extension-artifacts
107
116
108
117
- name : Install the extension
109
118
run : |
110
- set -eux
111
- python -m pip install "jupyterlab==4.0.3" jupyterlab_urdf*.whl
119
+ pip install jupyterlab_urdf*.whl
112
120
jupyter labextension list
113
121
114
122
- name : Install dependencies
@@ -118,10 +126,9 @@ jobs:
118
126
run : jlpm install
119
127
120
128
- name : Set up browser cache
121
- uses : actions/cache@v3
129
+ uses : actions/cache@v4
122
130
with :
123
- path : |
124
- ${{ github.workspace }}/pw-browsers
131
+ path : ${{ github.workspace }}/pw-browsers
125
132
key : ${{ runner.os }}-${{ hashFiles('ui-tests/yarn.lock') }}
126
133
127
134
- name : Install browser
@@ -130,23 +137,22 @@ jobs:
130
137
131
138
- name : Execute integration tests
132
139
working-directory : ui-tests
133
- run : |
134
- jlpm playwright test
140
+ run : jlpm playwright test
135
141
136
- - name : Upload Playwright Test report
142
+ - name : Upload playwright test report
137
143
if : always()
138
- uses : actions/upload-artifact@v3
144
+ uses : actions/upload-artifact@v4
139
145
with :
140
146
name : jupyterlab_urdf-playwright-tests
141
147
path : |
142
148
ui-tests/test-results
143
149
ui-tests/playwright-report
144
150
145
151
check_links :
146
- name : Check Links
152
+ name : Check links
147
153
runs-on : ubuntu-latest
148
154
timeout-minutes : 15
149
155
steps :
150
- - uses : actions/checkout@v3
156
+ - uses : actions/checkout@v4
151
157
- uses : jupyterlab/maintainer-tools/.github/actions/base-setup@v1
152
158
- uses : jupyterlab/maintainer-tools/.github/actions/check-links@v1
0 commit comments