-
-
Notifications
You must be signed in to change notification settings - Fork 449
245 lines (198 loc) Β· 7.07 KB
/
ci.yml
File metadata and controls
245 lines (198 loc) Β· 7.07 KB
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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
name: ci
on:
pull_request:
branches:
- main
- release
push:
branches:
- main
merge_group:
branches:
- main
# cancel in-progress runs on new commits to same PR (github.event.number)
concurrency:
group: ${{ github.workflow }}-${{ github.event.number || github.sha }}
cancel-in-progress: true
permissions:
contents: read
jobs:
lint:
name: π Lint project
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: voidzero-dev/setup-vp@ca1c46663915d6c1042ae23bd39ab85718bfb0fa # v1.10.0
with:
node-version: lts/*
run-install: false
- name: π¦ Install dependencies (root only, no scripts)
run: vp install --filter . --ignore-scripts
- name: π Lint project
run: vp run lint
types:
name: πͺ Type check
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: voidzero-dev/setup-vp@ca1c46663915d6c1042ae23bd39ab85718bfb0fa # v1.10.0
with:
node-version: lts/*
cache: true
- name: πͺ Type check
run: vp run test:types
unit:
name: π§ͺ Unit tests
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: voidzero-dev/setup-vp@ca1c46663915d6c1042ae23bd39ab85718bfb0fa # v1.10.0
with:
node-version: lts/*
cache: true
- name: π§ͺ Unit tests
run: vp test --project unit --coverage --reporter=default --reporter=junit --outputFile=test-report.junit.xml
- name: β¬οΈ Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
with:
disable_search: true
files: test-report.junit.xml
flags: unit
report_type: test_results
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: β¬οΈ Upload coverage reports to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
with:
disable_search: true
files: coverage/clover.xml
flags: unit
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
test:
name: π§ͺ Component tests
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: voidzero-dev/setup-vp@ca1c46663915d6c1042ae23bd39ab85718bfb0fa # v1.10.0
with:
node-version: lts/*
cache: true
- name: π Install browser
run: vp exec playwright install chromium-headless-shell
- name: π§ͺ Component tests
run: vp test --project nuxt --coverage --reporter=default --reporter=junit --outputFile=test-report.junit.xml
- name: β¬οΈ Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
with:
disable_search: true
files: test-report.junit.xml
flags: component
report_type: test_results
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: β¬οΈ Upload coverage reports to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
with:
disable_search: true
files: coverage/clover.xml
flags: component
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
browser:
name: π₯οΈ Browser tests
runs-on: ubuntu-24.04-arm
container:
image: mcr.microsoft.com/playwright:v1.58.2-noble@sha256:6446946a1d9fd62d9ae501312a2d76a43ee688542b21622056a372959b65d63d
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: π Fix Git ownership
run: git config --global --add safe.directory /__w/npmx.dev/npmx.dev
- uses: voidzero-dev/setup-vp@ca1c46663915d6c1042ae23bd39ab85718bfb0fa # v1.10.0
with:
node-version: lts/*
cache: true
- name: ποΈ Build project
run: vp run build:test
env:
VALIDATE_HTML: true
- name: π₯οΈ Test project (browser)
run: vp run test:browser:prebuilt
- name: β¬οΈ Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1
with:
disable_search: true
files: test-report.junit.xml
flags: browser
report_type: test_results
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
# TODO(serhalp): Upload browser *coverage* report once we've instrumented the prebuilt bundle
a11y:
name: βΏ Accessibility audit
runs-on: ubuntu-latest # See https://github.com/GoogleChrome/lighthouse/discussions/16834
strategy:
matrix:
mode: [dark, light]
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: voidzero-dev/setup-vp@ca1c46663915d6c1042ae23bd39ab85718bfb0fa # v1.10.0
with:
node-version: lts/*
cache: true
- name: ποΈ Build project
run: vp run build:test
- name: βΏ Accessibility audit (Lighthouse - ${{ matrix.mode }} mode)
run: vp run test:a11y:prebuilt
env:
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
LIGHTHOUSE_COLOR_MODE: ${{ matrix.mode }}
knip:
name: π§Ή Unused code check
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: voidzero-dev/setup-vp@ca1c46663915d6c1042ae23bd39ab85718bfb0fa # v1.10.0
with:
node-version: lts/*
cache: true
- name: π§Ή Check for unused code
run: vp run knip
i18n:
name: π i18n validation
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- uses: voidzero-dev/setup-vp@ca1c46663915d6c1042ae23bd39ab85718bfb0fa # v1.10.0
with:
node-version: lts/*
run-install: false
- name: π¦ Install dependencies (root only, no scripts)
run: vp install --filter . --ignore-scripts
- name: π Check for missing or dynamic i18n keys
run: vp run i18n:report
- name: π Check i18n schema is up to date
run: |
vp run i18n:schema
git diff --exit-code i18n/schema.json