-
Notifications
You must be signed in to change notification settings - Fork 12
96 lines (78 loc) · 2.22 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: CI
on:
push:
branches:
- main
- 'dev/**'
- jupyterlab3 # version compatible with JupyterLab 3, 0.3.x releases
pull_request:
defaults:
run:
shell: bash -l {0}
jobs:
unit-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [3.8, 3.9, '3.10', '3.11']
os: [macos-latest]
env:
PYTHON_VERSION: ${{ matrix.python-version }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Lint
run: |
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade pkgmt nox
pkgmt lint
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 20
cache: yarn
- name: Test
run: |
nox --session test --verbose
ui-test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.11']
shard: [1-of-3, 2-of-3, 3-of-3]
# we're creating macos snapshots
os: [macos-latest]
env:
PYTHON_VERSION: ${{ matrix.python-version }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 20
cache: yarn
- name: Install and test
run: |
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade nox
SHARD=${{ matrix.shard }}
# convert 1-of-4 to 1/4
SHARD_ARG=$(echo $SHARD | sed 's/-of-/\//g')
nox --session ui_test --verbose -- --shard $SHARD_ARG --reporter list
- name: Upload test snapshots
uses: actions/upload-artifact@v3
if: failure()
with:
name: test-results-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.shard }}
path: ui-tests/test-results