7
7
branches : " *"
8
8
9
9
jobs :
10
- test-conda-3x :
11
- name : Test Conda Python ${{ matrix.python-version }}
10
+ test-backend-conda :
11
+ name : Test server with Conda Python ${{ matrix.python-version }}
12
12
runs-on : ubuntu-latest
13
13
strategy :
14
14
matrix :
15
15
python-version : [3.6, 3.9]
16
16
steps :
17
17
- name : Checkout
18
18
uses : actions/checkout@v2
19
-
20
19
- name : Cache conda
21
20
uses : actions/cache@v2
22
21
env :
23
22
# Increase this value to reset cache
24
- CACHE_NUMBER : 2
23
+ CACHE_NUMBER : 3
25
24
with :
26
25
path : ~/conda_pkgs_dir
27
26
key : ${{ runner.os }}-conda-${{ matrix.python-version }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('requirements_dev.txt') }}
28
27
restore-keys : |
29
28
${{ runner.os }}-conda-${{ matrix.python-version }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('requirements_dev.txt') }}
30
29
${{ runner.os }}-conda-${{ matrix.python-version }}
30
+ - name : Setup Python ${{ matrix.python-version }}
31
+ uses : conda-incubator/setup-miniconda@v2
32
+ with :
33
+ activate-environment : test_gator
34
+ auto-update-conda : true
35
+ channels : conda-forge
36
+ python-version : ${{ matrix.python-version }}
37
+ show-channel-urls : true
38
+ use-only-tar-bz2 : true
39
+ - name : Install dependencies
40
+ run : |
41
+ conda activate test_gator
42
+ conda install -n test_gator --file requirements_dev.txt
43
+ pip install .
44
+ shell : bash -l {0}
45
+ - name : Test the server extension
46
+ run : |
47
+ conda activate test_gator
48
+ python -m pytest mamba_gator
49
+ shell : bash -l {0}
31
50
32
- - name : Get yarn cache directory path
33
- id : yarn-cache-dir-path
34
- run : echo "::set-output name=dir::$(yarn cache dir)"
35
- - name : Setup yarn cache
51
+ test-backend-mamba :
52
+ name : Test server with Mamba Python ${{ matrix.python-version }}
53
+ runs-on : ubuntu-latest
54
+ strategy :
55
+ matrix :
56
+ # Skip 3.7 as it is used for integration tests
57
+ python-version : [3.6, 3.8, 3.9]
58
+ steps :
59
+ - name : Checkout
60
+ uses : actions/checkout@v2
61
+ - name : Cache conda
36
62
uses : actions/cache@v2
37
- id : yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
38
63
env :
39
- # Increase this value to reset cache
40
- CACHE_NUMBER : 4
64
+ # Increase this value to reset cache if requirements_dev.txt has not changed
65
+ CACHE_NUMBER : 1
41
66
with :
42
- path : |
43
- ${{ steps.yarn-cache-dir-path.outputs.dir }}
44
- **/node_modules
45
- key : ${{ runner.os }}-yarn-${{ env.CACHE_NUMBER }}-${{ hashFiles('**/yarn.lock') }}
67
+ path : ~/conda_pkgs_dir
68
+ key : ${{ runner.os }}-mamba-${{ matrix.python-version }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('requirements_dev.txt') }}
46
69
restore-keys : |
47
- ${{ runner.os }}-yarn-${{ env.CACHE_NUMBER }}
48
- ${{ runner.os }}-yarn-
49
-
70
+ ${{ runner.os }}-mamba-${{ matrix.python-version }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('requirements_dev.txt') }}
71
+ ${{ runner.os }}-mamba-${{ matrix.python-version }}
50
72
- name : Setup Python ${{ matrix.python-version }}
51
73
uses : conda-incubator/setup-miniconda@v2
52
74
with :
53
75
activate-environment : test_gator
54
76
auto-update-conda : true
55
77
channels : conda-forge
78
+ mamba-version : " *"
56
79
python-version : ${{ matrix.python-version }}
57
80
show-channel-urls : true
58
81
use-only-tar-bz2 : true
59
-
60
82
- name : Install dependencies
61
83
run : |
62
84
conda activate test_gator
63
- conda install -n test_gator --file requirements_dev.txt
64
- yarn install
85
+ mamba install -n test_gator --file requirements_dev.txt
86
+ conda install -n test_gator jupyterlab=2
65
87
pip install .
88
+ # Check pip dependencies
89
+ pip check
66
90
shell : bash -l {0}
67
-
68
- - name : Test the extension
91
+ - name : Test the server extension
69
92
run : |
70
93
conda activate test_gator
71
94
python -m pytest mamba_gator
72
95
shell : bash -l {0}
73
96
74
- test-conda -os :
97
+ test-all -os :
75
98
name : Test Conda Python 3.7 on ${{ matrix.os }}
76
99
runs-on : ${{ matrix.os }}
77
100
continue-on-error : true
@@ -150,28 +173,23 @@ jobs:
150
173
if [ "${OS_RUNNER}" != "windows-latest" ]; then python -m jupyterlab.browser_check; fi
151
174
shell : bash -l {0}
152
175
153
- test-mamba-3x :
154
- name : Test Mamba Python ${{ matrix.python-version }}
176
+ test-integration :
177
+ name : All tests on Ubuntu Mamba Python 3.7
155
178
runs-on : ubuntu-latest
156
- strategy :
157
- matrix :
158
- python-version : [3.6, 3.7, 3.8, 3.9]
159
179
steps :
160
180
- name : Checkout
161
181
uses : actions/checkout@v2
162
-
163
182
- name : Cache conda
164
183
uses : actions/cache@v2
165
184
env :
166
185
# Increase this value to reset cache if requirements_dev.txt has not changed
167
186
CACHE_NUMBER : 0
168
187
with :
169
188
path : ~/conda_pkgs_dir
170
- key : ${{ runner.os }}-mamba-${{ matrix.python-version }} -${{ env.CACHE_NUMBER }}-${{ hashFiles('requirements_dev.txt') }}
189
+ key : ${{ runner.os }}-mamba-3.7 -${{ env.CACHE_NUMBER }}-${{ hashFiles('requirements_dev.txt') }}
171
190
restore-keys : |
172
- ${{ runner.os }}-mamba-${{ matrix.python-version }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('requirements_dev.txt') }}
173
- ${{ runner.os }}-mamba-${{ matrix.python-version }}
174
-
191
+ ${{ runner.os }}-mamba-3.7-${{ env.CACHE_NUMBER }}-${{ hashFiles('requirements_dev.txt') }}
192
+ ${{ runner.os }}-mamba-3.7
175
193
- name : Get yarn cache directory path
176
194
id : yarn-cache-dir-path
177
195
run : echo "::set-output name=dir::$(yarn cache dir)"
@@ -190,14 +208,14 @@ jobs:
190
208
${{ runner.os }}-yarn-${{ env.CACHE_NUMBER }}
191
209
${{ runner.os }}-yarn-
192
210
193
- - name : Setup Python ${{ matrix.python-version }}
211
+ - name : Setup Python 3.7
194
212
uses : conda-incubator/setup-miniconda@v2
195
213
with :
196
214
activate-environment : test_gator
197
215
auto-update-conda : true
198
216
channels : conda-forge
199
217
mamba-version : " *"
200
- python-version : ${{ matrix.python-version }}
218
+ python-version : " 3.7 "
201
219
show-channel-urls : true
202
220
use-only-tar-bz2 : true
203
221
@@ -216,10 +234,13 @@ jobs:
216
234
- name : Test the extension
217
235
run : |
218
236
conda activate test_gator
237
+ # Run linter
219
238
flake8 setup.py mamba_gator
239
+ yarn run eslint:check
240
+
241
+ # Run test
220
242
coverage run -m pytest mamba_gator
221
243
coverage report
222
- yarn run eslint:check
223
244
yarn run test
224
245
225
246
jupyter serverextension list 1>serverextensions 2>&1
@@ -228,6 +249,13 @@ jobs:
228
249
cat labextensions | grep "@mamba-org/gator-lab.*OK"
229
250
python -m jupyterlab.browser_check
230
251
shell : bash -l {0}
252
+ # - name: Integration tests
253
+ # run: |
254
+ # chmod -R a+rx ./e2e-tests
255
+ # docker-compose -f "docker-compose.yml" run e2e ./e2e-tests/run_e2e.sh
256
+ # - name: Stop containers
257
+ # if: always()
258
+ # run: docker-compose -f "docker-compose.yml" down
231
259
232
260
- name : Install Ruby
233
261
uses : ruby/setup-ruby@v1
@@ -246,16 +274,11 @@ jobs:
246
274
cd ../../
247
275
python -m coveralls --merge=common-jscoverage.json
248
276
shell : bash -l {0}
249
-
250
- coveralls :
251
- name : Finish Coveralls
252
- needs : test-mamba-3x
253
- runs-on : ubuntu-latest
254
- container : python:3-slim
255
- steps :
256
- - name : Finished
277
+ - name : Coverage finished
257
278
run : |
258
- pip3 install --upgrade coveralls
279
+ conda activate test_gator
280
+ pip install --upgrade coveralls
259
281
coveralls --finish
260
282
env :
261
283
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
284
+ shell : bash -l {0}
0 commit comments