@@ -20,6 +20,48 @@ permissions:
2020 contents : read
2121
2222jobs :
23+ build :
24+ name : 🏗️ Build project
25+ runs-on : ubuntu-24.04-arm
26+
27+ steps :
28+ - uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
29+
30+ - uses : actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
31+ with :
32+ node-version : lts/*
33+
34+ - uses : pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # 4e1c8eafbd745f64b1ef30a7d7ed7965034c486c
35+ name : 🟧 Install pnpm
36+ with :
37+ cache : true
38+
39+ - name : 📦 Install dependencies
40+ run : pnpm install
41+
42+ - name : 📦 Restore Nuxt build cache
43+ uses : actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
44+ with :
45+ path : |
46+ .nuxt
47+ node_modules/.cache
48+ key : nuxt-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('pnpm-lock.yaml') }}-${{ hashFiles('app/**', 'server/**', 'shared/**', 'nuxt.config.*') }}
49+ restore-keys : |
50+ nuxt-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('pnpm-lock.yaml') }}-
51+ nuxt-${{ runner.os }}-${{ runner.arch }}-
52+
53+ - name : 🏗️ Build project
54+ run : pnpm build:test
55+ env :
56+ VALIDATE_HTML : true
57+
58+ - name : ⬆︎ Upload build output
59+ uses : actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
60+ with :
61+ name : build-output
62+ path : .output/
63+ retention-days : 1
64+
2365 lint :
2466 name : 🔠 Lint project
2567 runs-on : ubuntu-24.04-arm
@@ -131,6 +173,7 @@ jobs:
131173
132174 browser :
133175 name : 🖥️ Browser tests
176+ needs : build
134177 runs-on : ubuntu-24.04-arm
135178 container :
136179 image : mcr.microsoft.com/playwright:v1.58.2-noble
@@ -150,16 +193,18 @@ jobs:
150193 - name : 📦 Install dependencies
151194 run : pnpm install
152195
153- - name : 🏗️ Build project
154- run : pnpm build:test
155- env :
156- VALIDATE_HTML : true
196+ - name : ⬇︎ Download build output
197+ uses : actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
198+ with :
199+ name : build-output
200+ path : .output/
157201
158202 - name : 🖥️ Test project (browser)
159203 run : pnpm test:browser:prebuilt
160204
161205 a11y :
162206 name : ♿ Accessibility audit
207+ needs : build
163208 runs-on : ubuntu-latest # See https://github.com/GoogleChrome/lighthouse/discussions/16834
164209 strategy :
165210 matrix :
@@ -180,8 +225,11 @@ jobs:
180225 - name : 📦 Install dependencies
181226 run : pnpm install
182227
183- - name : 🏗️ Build project
184- run : pnpm build:test
228+ - name : ⬇︎ Download build output
229+ uses : actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
230+ with :
231+ name : build-output
232+ path : .output/
185233
186234 - name : ♿ Accessibility audit (Lighthouse - ${{ matrix.mode }} mode)
187235 run : pnpm test:a11y:prebuilt
0 commit comments