-
-
Notifications
You must be signed in to change notification settings - Fork 394
190 lines (146 loc) Β· 5.22 KB
/
ci.yml
File metadata and controls
190 lines (146 loc) Β· 5.22 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
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 (gitub.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
- uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1
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
- uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1
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
- uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1
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/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
test:
name: π§ͺ Component tests
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1
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 coverage reports to Codecov
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6
with:
report_type: test_results
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
- name: β¬οΈ Upload coverage reports to Codecov
uses: codecov/codecov-action@57e3a136b779b570ffcdbf80b3bdc90e7fab3de2 # v6
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
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1
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
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
- uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1
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
- uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1
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
- uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1
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