-
Notifications
You must be signed in to change notification settings - Fork 8
194 lines (155 loc) · 4.67 KB
/
ci.yml
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
name: CI
on:
push:
branches: [main]
pull_request:
branches: ["*"]
workflow_dispatch:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
env:
PIP_DISABLE_PIP_VERSION_CHECK: 1
PYTHONIOENCODING: utf-8
PYTHONUNBUFFERED: 1
MAMBA_NO_BANNER: 1
# ours
CACHE_EPOCH: 3
ATEST_RETRIES: 3
defaults:
run:
shell: bash -l {0}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: install (conda)
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Mambaforge
environment-file: .github/locks/lock_linux-64.conda.lock
use-mamba: true
- name: preflight
run: doit preflight
- name: setup (python)
run: doit lock:install:build_linux-64_lab4.0
- name: cache (node)
uses: actions/cache@v3
id: cache-node-modules
with:
path: |-
**/node_modules
build/.cache/yarn
key: |
${{ env.CACHE_EPOCH }}-ubuntu-node-modules-${{ hashFiles('yarn.lock') }}
- name: setup (js)
run: doit js-root:setup
- name: build
run: doit build || doit list
- name: build (retry)
run: doit build
- name: dist
run: doit dist
- name: upload (dist)
uses: actions/upload-artifact@v3
with:
name: jupyterlab-fonts-${{ github.run_number }}-dist
path: ./dist
- name: upload (preflight)
uses: actions/upload-artifact@v3
with:
name: jupyterlab-fonts-${{ github.run_number }}-lock-preflight
path: ./build/locks
- name: Rename uncached conda packages
run: mv "${CONDA_PKGS_DIR}" "${CONDA_PKGS_DIR}_do_not_cache"
lint:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
- name: install (conda)
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Mambaforge
environment-file: .github/locks/lock_linux-64.conda.lock
use-mamba: true
- name: preflight
run: doit lock:preflight
- name: setup (python)
run: doit lock:install:build_linux-64_lab4.0
- name: cache (node)
uses: actions/cache@v3
id: cache-node-modules
with:
path: |-
**/node_modules
build/.cache/yarn
key: |
${{ env.CACHE_EPOCH }}-ubuntu-node-modules-${{ hashFiles('yarn.lock') }}
- name: setup (js)
run: doit js-root:setup
- name: lint
run: doit lint
- name: Rename uncached conda packages
run: mv "${CONDA_PKGS_DIR}" "${CONDA_PKGS_DIR}_do_not_cache"
test:
needs: [build, lint]
name: test ${{ matrix.os }} ${{ matrix.lab-version }}
runs-on: ${{ matrix.os }}-latest
env:
TESTING_IN_CI: '1'
JLF_LAB: ${{ matrix.lab-version }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu', 'macos', 'windows']
lab-version: ['lab3.5', 'lab4.0']
include:
- os: ubuntu
subdir: linux-64
- os: macos
subdir: osx-64
- os: windows
subdir: win-64
steps:
- name: configure line endings
run: git config --global core.autocrlf false
- name: checkout
uses: actions/checkout@v4
- name: install (conda)
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Mambaforge
environment-file: .github/locks/lock_${{ matrix.subdir }}.conda.lock
use-mamba: true
- name: download (preflight)
uses: actions/download-artifact@v3
with:
name: jupyterlab-fonts-${{ github.run_number }}-lock-preflight
path: ./build/locks
- name: download (dist)
uses: actions/download-artifact@v3
with:
name: jupyterlab-fonts-${{ github.run_number }}-dist
path: ./dist
- name: test (pytest)
run: doit dt:test:pytest || doit list
- name: test (pytest, retry)
run: doit dt:test:pytest
- name: test (robot)
run: doit dt:atest:a_1
- name: test (robot, retry 1)
run: doit dt:atest:a_2
- name: test (robot, retry 2)
run: doit dt:atest:a_3
- name: upload (reports)
if: always()
uses: actions/upload-artifact@v3
with:
name: |
jupyterlab-fonts-${{ github.run_number }}-reports-${{ runner.os }}-f${{ matrix.lab-version }}
path: ./build/reports
- name: Rename uncached conda packages
run: mv "${CONDA_PKGS_DIR}" "${CONDA_PKGS_DIR}_do_not_cache"