@@ -21,6 +21,7 @@ permissions:
2121
2222jobs :
2323 lint :
24+ name : 🔠 Lint project
2425 runs-on : ubuntu-latest
2526
2627 steps :
@@ -31,17 +32,58 @@ jobs:
3132 node-version : lts/*
3233
3334 - uses : pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
34- name : Install pnpm
35+ name : 🟧 Install pnpm
36+ # pnpm cache skipped deliberately as the project is not actually installed here
37+
38+ - name : 🔠 Lint project
39+ run : node scripts/lint.ts
40+
41+ types :
42+ name : 💪 Type check
43+ runs-on : ubuntu-latest
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
53+ name : 🟧 Install pnpm
3554 with :
3655 cache : true
3756
3857 - name : 📦 Install dependencies
3958 run : pnpm install
4059
41- - name : 🔠 Lint project
42- run : pnpm lint
60+ - name : 💪 Type check
61+ run : pnpm test:types
62+
63+ unit :
64+ name : 🧪 Unit tests
65+ runs-on : ubuntu-latest
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
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 --project unit run --coverage
4384
4485 test :
86+ name : 🧪 Component tests
4587 runs-on : ubuntu-latest
4688
4789 steps :
@@ -52,26 +94,26 @@ jobs:
5294 node-version : lts/*
5395
5496 - uses : pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
55- name : Install pnpm
97+ name : 🟧 Install pnpm
5698 with :
5799 cache : true
58100
59101 - name : 📦 Install dependencies
60102 run : pnpm install
61103
62104 - name : 🌐 Install browser
63- run : pnpm playwright install
105+ run : pnpm playwright install chromium-headless-shell
64106
65- - name : 💪 Type check
66- run : pnpm test:types
107+ - name : 🧪 Component tests
108+ run : pnpm vite test --project nuxt run --coverage
67109
68- - name : 🧪 Unit test
69- run : pnpm test:unit
70-
71- - name : 🏃 Component tests
72- run : pnpm test:nuxt
110+ - name : Upload coverage reports to Codecov
111+ uses : codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5
112+ env :
113+ CODECOV_TOKEN : 17b4bed9-d407-4ce2-9c10-2ccd4328a1d9
73114
74115 browser :
116+ name : 🖥️ Browser tests
75117 runs-on : ubuntu-latest
76118 container :
77119 image : mcr.microsoft.com/playwright:v1.58.0-noble
@@ -84,18 +126,25 @@ jobs:
84126 node-version : lts/*
85127
86128 - uses : pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
87- name : Install pnpm
129+ name : 🟧 Install pnpm
88130 with :
89131 cache : true
90132
91133 - name : 📦 Install dependencies
92134 run : pnpm install
93135
136+ - name : 🏗️ Build project
137+ run : pnpm build:playwright
138+
94139 - name : 🖥️ Test project (browser)
95- run : pnpm test:browser
140+ run : pnpm test:browser:prebuilt
96141
97142 a11y :
143+ name : ♿ Accessibility audit
98144 runs-on : ubuntu-latest
145+ strategy :
146+ matrix :
147+ mode : [dark, light]
99148
100149 steps :
101150 - uses : actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
@@ -105,22 +154,24 @@ jobs:
105154 node-version : lts/*
106155
107156 - uses : pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
108- name : Install pnpm
157+ name : 🟧 Install pnpm
109158 with :
110159 cache : true
111160
112161 - name : 📦 Install dependencies
113162 run : pnpm install
114163
115164 - name : 🏗️ Build project
116- run : pnpm build
165+ run : NODE_ENV=test pnpm build
117166
118- - name : ♿ Accessibility audit (Lighthouse - dark & light mode)
167+ - name : ♿ Accessibility audit (Lighthouse - ${{ matrix.mode }} mode)
119168 run : ./scripts/lighthouse-a11y.sh
120169 env :
121170 LHCI_GITHUB_APP_TOKEN : ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
171+ LIGHTHOUSE_COLOR_MODE : ${{ matrix.mode }}
122172
123173 knip :
174+ name : 🧹 Unused code check
124175 runs-on : ubuntu-latest
125176
126177 steps :
@@ -131,12 +182,12 @@ jobs:
131182 node-version : lts/*
132183
133184 - uses : pnpm/action-setup@1e1c8eafbd745f64b1ef30a7d7ed7965034c486c
134- name : Install pnpm
185+ name : 🟧 Install pnpm
135186 with :
136187 cache : true
137188
138189 - name : 📦 Install dependencies
139190 run : pnpm install
140191
141- - name : 🔍 Check for unused code
192+ - name : 🧹 Check for unused code
142193 run : pnpm knip
0 commit comments