@@ -21,7 +21,8 @@ permissions:
2121
2222jobs :
2323 lint :
24- runs-on : ubuntu-latest
24+ name : 🔠 Lint project
25+ runs-on : ubuntu-24.04-arm
2526
2627 steps :
2728 - uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
@@ -30,15 +31,66 @@ jobs:
3031 with :
3132 node-version : lts/*
3233
33- - uses : pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
34- name : Install pnpm
34+ - uses : pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c # 1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
35+ name : 🟧 Install pnpm
3536 # pnpm cache skipped deliberately as the project is not actually installed here
3637
3738 - name : 🔠 Lint project
3839 run : node scripts/lint.ts
3940
41+ types :
42+ name : 💪 Type check
43+ runs-on : ubuntu-24.04-arm
44+
45+ steps :
46+ - uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
47+
48+ - uses : actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
49+ with :
50+ node-version : lts/*
51+
52+ - uses : pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c # 1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
53+ name : 🟧 Install pnpm
54+ with :
55+ cache : true
56+
57+ - name : 📦 Install dependencies
58+ run : pnpm install
59+
60+ - name : 💪 Type check
61+ run : pnpm test:types
62+
63+ unit :
64+ name : 🧪 Unit tests
65+ runs-on : ubuntu-24.04-arm
66+
67+ steps :
68+ - uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
69+
70+ - uses : actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
71+ with :
72+ node-version : lts/*
73+
74+ - uses : pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c # 1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
75+ name : 🟧 Install pnpm
76+ with :
77+ cache : true
78+
79+ - name : 📦 Install dependencies
80+ run : pnpm install
81+
82+ - name : 🧪 Unit tests
83+ run : pnpm test:unit run --coverage --reporter=junit --outputFile=test-report.junit.xml
84+
85+ - name : ⬆︎ Upload test results to Codecov
86+ if : ${{ !cancelled() }}
87+ uses : codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1
88+ with :
89+ token : ${{ secrets.CODECOV_TOKEN }}
90+
4091 test :
41- runs-on : ubuntu-latest
92+ name : 🧪 Component tests
93+ runs-on : ubuntu-24.04-arm
4294
4395 steps :
4496 - uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
4799 with :
48100 node-version : lts/*
49101
50- - uses : pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
51- name : Install pnpm
102+ - uses : pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c # 1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
103+ name : 🟧 Install pnpm
52104 with :
53105 cache : true
54106
@@ -58,17 +110,23 @@ jobs:
58110 - name : 🌐 Install browser
59111 run : pnpm playwright install chromium-headless-shell
60112
61- - name : 💪 Type check
62- run : pnpm test:types
113+ - name : 🧪 Component tests
114+ run : pnpm test:nuxt run --coverage --reporter=junit --outputFile=test-report.junit.xml
63115
64- - name : 🧪 Unit and component tests
65- run : pnpm vite test run --coverage
116+ - name : ⬆︎ Upload test results to Codecov
117+ if : ${{ !cancelled() }}
118+ uses : codecov/test-results-action@0fa95f0e1eeaafde2c782583b36b28ad0d8c77d3 # v1
119+ with :
120+ token : ${{ secrets.CODECOV_TOKEN }}
66121
67- - name : Upload coverage reports to Codecov
122+ - name : ⬆︎ Upload coverage reports to Codecov
68123 uses : codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5
124+ env :
125+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
69126
70127 browser :
71- runs-on : ubuntu-latest
128+ name : 🖥️ Browser tests
129+ runs-on : ubuntu-24.04-arm
72130 container :
73131 image : mcr.microsoft.com/playwright:v1.58.0-noble
74132
@@ -79,19 +137,23 @@ jobs:
79137 with :
80138 node-version : lts/*
81139
82- - uses : pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
83- name : Install pnpm
140+ - uses : pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c # 1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
141+ name : 🟧 Install pnpm
84142 with :
85143 cache : true
86144
87145 - name : 📦 Install dependencies
88146 run : pnpm install
89147
148+ - name : 🏗️ Build project
149+ run : pnpm build:playwright
150+
90151 - name : 🖥️ Test project (browser)
91- run : pnpm test:browser
152+ run : pnpm test:browser:prebuilt
92153
93154 a11y :
94- runs-on : ubuntu-latest
155+ name : ♿ Accessibility audit
156+ runs-on : ubuntu-latest # See https://github.com/GoogleChrome/lighthouse/discussions/16834
95157 strategy :
96158 matrix :
97159 mode : [dark, light]
@@ -103,16 +165,16 @@ jobs:
103165 with :
104166 node-version : lts/*
105167
106- - uses : pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
107- name : Install pnpm
168+ - uses : pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c # 1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
169+ name : 🟧 Install pnpm
108170 with :
109171 cache : true
110172
111173 - name : 📦 Install dependencies
112174 run : pnpm install
113175
114176 - name : 🏗️ Build project
115- run : pnpm build
177+ run : NODE_ENV=test pnpm build
116178
117179 - name : ♿ Accessibility audit (Lighthouse - ${{ matrix.mode }} mode)
118180 run : ./scripts/lighthouse-a11y.sh
@@ -121,7 +183,8 @@ jobs:
121183 LIGHTHOUSE_COLOR_MODE : ${{ matrix.mode }}
122184
123185 knip :
124- runs-on : ubuntu-latest
186+ name : 🧹 Unused code check
187+ runs-on : ubuntu-24.04-arm
125188
126189 steps :
127190 - uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
@@ -130,13 +193,16 @@ jobs:
130193 with :
131194 node-version : lts/*
132195
133- - uses : pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
134- name : Install pnpm
196+ - uses : pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c # 1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
197+ name : 🟧 Install pnpm
135198 with :
136199 cache : true
137200
138201 - name : 📦 Install dependencies
139202 run : pnpm install
140203
141- - name : 🔍 Check for unused code
204+ - name : 🧹 Check for unused code
142205 run : pnpm knip
206+
207+ - name : 🧹 Check for unused production code
208+ run : pnpm knip --production
0 commit comments