7
7
pull_request :
8
8
branches :
9
9
- main
10
+ schedule :
11
+ - cron : " 0 12 * * 1" # monday at noon UTC
10
12
11
13
defaults :
12
14
run :
13
15
shell : bash -l {0}
14
16
15
17
jobs :
16
- run :
17
- runs-on : ${{ matrix.os }}
18
-
19
- strategy :
20
- fail-fast : false
21
- matrix :
22
- os : [ubuntu-latest]
23
- python-version : [3.8]
24
-
25
- steps :
26
- - name : Checkout
27
- uses : actions/checkout@v2
28
-
29
- - name : Setup conda
30
- uses : conda-incubator/setup-miniconda@v2
31
- with :
32
- activate-environment : ipympl-dev
33
- environment-file : dev-environment.yml
34
- python-version : ${{ matrix.python-version }}
35
- mamba-version : " *"
36
- auto-activate-base : false
37
- channels : conda-forge
38
-
39
- - name : Install ipympl
40
- run : |
41
- python -m build
42
- pip install dist/*.whl
43
-
44
- - name : Check installation files
45
- run : |
46
- test -d $CONDA_PREFIX/share/jupyter/nbextensions/jupyter-matplotlib
47
- test -f $CONDA_PREFIX/share/jupyter/nbextensions/jupyter-matplotlib/extension.js
48
- test -f $CONDA_PREFIX/share/jupyter/nbextensions/jupyter-matplotlib/index.js
49
- test -d $CONDA_PREFIX/share/jupyter/labextensions/jupyter-matplotlib
50
- test -f $CONDA_PREFIX/share/jupyter/labextensions/jupyter-matplotlib/package.json
51
-
52
- - name : Check nbextension and labextension
53
- run : |
54
- jupyter nbextension list 2>&1 | grep -ie "jupyter-matplotlib/extension.*enabled" -
55
- jupyter labextension list 2>&1 | grep -ie "jupyter-matplotlib.*enabled.*ok" -
56
-
57
- - name : Run tests
58
- run : pytest .
59
-
60
18
build :
61
19
runs-on : ubuntu-latest
62
20
steps :
@@ -86,25 +44,23 @@ jobs:
86
44
name : dist ${{ github.run_number }}
87
45
path : ./dist
88
46
89
- install :
47
+ Test :
90
48
runs-on : ${{ matrix.os }}-latest
91
49
needs : [build]
92
50
93
51
strategy :
94
52
fail-fast : false
95
53
matrix :
96
54
os : [ubuntu, macos]
97
- python : ['3.6', '3.9']
55
+ python : ['3.10', '3.9']
56
+ mpl-version : ['3.5', 'latest']
98
57
include :
99
- - python : ' 3.6 '
58
+ - python : ' 3.10 '
100
59
dist : ' ipympl*.tar.gz'
101
- jlab_version : 3
102
60
- python : ' 3.9'
103
61
dist : ' ipympl*.whl'
104
- jlab_version : 2.3.2
105
62
106
63
steps :
107
-
108
64
- name : Checkout
109
65
uses : actions/checkout@v2
110
66
@@ -117,7 +73,15 @@ jobs:
117
73
channels : conda-forge
118
74
119
75
- name : Install dependencies
120
- run : mamba install python=${{ matrix.python-version }} pip yarn jupyterlab=${{ matrix.jlab_version }} ipywidgets jupyter-packaging
76
+ run : mamba install python=${{ matrix.python-version }} pip yarn nodejs=16 jupyterlab jupyter-packaging nbval pytest ipywidgets
77
+
78
+ - if : matrix.mpl-version == 'latest'
79
+ name : Install latest Matplotlib
80
+ run : pip install --upgrade --pre --index-url https://pypi.anaconda.org/scipy-wheels-nightly/simple --extra-index-url https://pypi.org/simple matplotlib
81
+
82
+ - if : matrix.mpl-version != 'latest'
83
+ name : Install matplotlib pinned
84
+ run : mamba install matplotlib=${{ matrix.mpl-version}}.*
121
85
122
86
- uses : actions/download-artifact@v2
123
87
with :
@@ -129,12 +93,6 @@ jobs:
129
93
cd dist
130
94
pip install -vv ${{ matrix.dist }}
131
95
132
- - name : Manually install labextension for lab2
133
- if : ${{ matrix.jlab_version }} == 2.3.2
134
- env :
135
- NODE_OPTIONS : --openssl-legacy-provider
136
- run : jupyter labextension install --debug .
137
-
138
96
- name : Test installation files
139
97
run : |
140
98
test -d $CONDA_PREFIX/share/jupyter/nbextensions/jupyter-matplotlib
@@ -150,60 +108,38 @@ jobs:
150
108
- name : Validate the labextension
151
109
run : jupyter labextension list 2>&1 | grep jupyter-matplotlib
152
110
111
+ - name : Run pytest
112
+ run : pytest .
153
113
154
- visual-regression-tests :
155
- runs-on : ubuntu-latest
156
- needs : [build]
157
-
158
- strategy :
159
- fail-fast : false
160
-
161
- steps :
162
-
163
- - name : Checkout
164
- uses : actions/checkout@v2
165
-
166
- - name : Setup conda
167
- uses : conda-incubator/setup-miniconda@v2
168
- with :
169
- python-version : 3.9
170
- mamba-version : " *"
171
- auto-activate-base : false
172
- channels : conda-forge
173
-
174
- - name : Install dependencies
175
- run : mamba install pip yarn jupyterlab=3.0.11 ipywidgets jupyter-packaging
176
-
177
- - uses : actions/download-artifact@v2
178
- with :
179
- name : dist ${{ github.run_number }}
180
- path : ./dist
181
-
182
- - name : Install the package
183
- run : pip install -vv ipympl*.whl
184
- working-directory : dist
185
-
186
- - name : Install test dependencies
187
- run : yarn install
114
+ - name : Install Galata test dependencies
115
+ if : matrix.os == 'ubuntu'
116
+ run : |
117
+ yarn install
118
+ yarn playwright install chromium
188
119
working-directory : ui-tests
189
120
190
121
- name : Launch JupyterLab
191
- run : yarn run start-jlab:detached
122
+ if : matrix.os == 'ubuntu'
123
+ run : yarn run start:detached
192
124
working-directory : ui-tests
193
125
194
126
- name : Wait for JupyterLab
127
+ if : matrix.os == 'ubuntu'
195
128
uses : ifaxity/wait-on-action@v1
196
129
with :
197
130
resource : http-get://localhost:8888/api
198
131
timeout : 20000
199
132
200
133
- name : Run UI Tests
134
+ if : matrix.os == 'ubuntu'
201
135
run : yarn run test
202
136
working-directory : ui-tests
203
137
204
138
- name : Upload UI Test artifacts
205
- if : always()
139
+ if : always() && matrix.os == 'ubuntu'
206
140
uses : actions/upload-artifact@v2
207
141
with :
208
142
name : ui-test-output
209
- path : ui-tests/test-output
143
+ path : |
144
+ ui-tests/playwright-report
145
+ ui-tests/test-results
0 commit comments