Skip to content

Commit 9102ca2

Browse files
committed
ci: use voidzero-dev/setup-vp instead of setup-node + pnpm/action-setup
Replace the two-step setup pattern (actions/setup-node + pnpm/action-setup + pnpm install) with the unified voidzero-dev/setup-vp action across all CI workflows. This simplifies setup to a single step with node-version, cache, and automatic dependency installation via vp. - Replace all pnpm vp commands with vp directly - Build storybook via vp before passing to chromatic action
1 parent 5d8fcf5 commit 9102ca2

File tree

5 files changed

+43
-106
lines changed

5 files changed

+43
-106
lines changed

.github/workflows/autofix.yml

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,26 +20,21 @@ jobs:
2020
steps:
2121
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2222

23-
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
23+
- uses: voidzero-dev/setup-vp@af9f92ccd3e5694c919913c47be133a1847ea58e # v1
2424
with:
2525
node-version: lts/*
26-
27-
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # 5e1c8eafbd745f64b1ef30a7d7ed7965034c486c
28-
name: 🟧 Install pnpm
29-
30-
- name: 📦 Install dependencies
31-
run: pnpm install
26+
cache: true
3227

3328
- name: 🎨 Check for non-RTL/non-a11y CSS classes
34-
run: pnpm vp run lint:css
29+
run: vp run lint:css
3530

3631
- name: 🌐 Compare translations
37-
run: pnpm vp run i18n:check
32+
run: vp run i18n:check
3833

3934
- name: 🌍 Update lunaria data
40-
run: pnpm vp run build:lunaria
35+
run: vp run build:lunaria
4136

4237
- name: 🔠 Fix lint errors
43-
run: pnpm vp run lint:fix
38+
run: vp run lint:fix
4439

4540
- uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27 # 635ffb0c9798bd160680f18fd73371e355b85f27

.github/workflows/ci.yml

Lines changed: 28 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,13 @@ jobs:
2828
steps:
2929
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3030

31-
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
31+
- uses: voidzero-dev/setup-vp@af9f92ccd3e5694c919913c47be133a1847ea58e # v1
3232
with:
3333
node-version: lts/*
34-
35-
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # 5e1c8eafbd745f64b1ef30a7d7ed7965034c486c
36-
name: 🟧 Install pnpm
37-
38-
- name: 📦 Install dependencies (root only, no scripts)
39-
run: pnpm install --filter . --ignore-scripts
34+
cache: true
4035

4136
- name: 🔠 Lint project
42-
run: pnpm vp run lint
37+
run: vp run lint
4338

4439
types:
4540
name: 💪 Type check
@@ -48,18 +43,13 @@ jobs:
4843
steps:
4944
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5045

51-
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
46+
- uses: voidzero-dev/setup-vp@af9f92ccd3e5694c919913c47be133a1847ea58e # v1
5247
with:
5348
node-version: lts/*
54-
55-
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # 5e1c8eafbd745f64b1ef30a7d7ed7965034c486c
56-
name: 🟧 Install pnpm
57-
58-
- name: 📦 Install dependencies
59-
run: pnpm install
49+
cache: true
6050

6151
- name: 💪 Type check
62-
run: pnpm vp run test:types
52+
run: vp run test:types
6353

6454
unit:
6555
name: 🧪 Unit tests
@@ -68,18 +58,13 @@ jobs:
6858
steps:
6959
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
7060

71-
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
61+
- uses: voidzero-dev/setup-vp@af9f92ccd3e5694c919913c47be133a1847ea58e # v1
7262
with:
7363
node-version: lts/*
74-
75-
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # 5e1c8eafbd745f64b1ef30a7d7ed7965034c486c
76-
name: 🟧 Install pnpm
77-
78-
- name: 📦 Install dependencies
79-
run: pnpm install
64+
cache: true
8065

8166
- name: 🧪 Unit tests
82-
run: pnpm vp test --project unit --coverage --reporter=default --reporter=junit --outputFile=test-report.junit.xml
67+
run: vp test --project unit --coverage --reporter=default --reporter=junit --outputFile=test-report.junit.xml
8368

8469
- name: ⬆︎ Upload test results to Codecov
8570
if: ${{ !cancelled() }}
@@ -94,21 +79,16 @@ jobs:
9479
steps:
9580
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
9681

97-
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
82+
- uses: voidzero-dev/setup-vp@af9f92ccd3e5694c919913c47be133a1847ea58e # v1
9883
with:
9984
node-version: lts/*
100-
101-
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # 5e1c8eafbd745f64b1ef30a7d7ed7965034c486c
102-
name: 🟧 Install pnpm
103-
104-
- name: 📦 Install dependencies
105-
run: pnpm install
85+
cache: true
10686

10787
- name: 🌐 Install browser
108-
run: pnpm vp exec playwright install chromium-headless-shell
88+
run: vp exec playwright install chromium-headless-shell
10989

11090
- name: 🧪 Component tests
111-
run: pnpm vp test --project nuxt --coverage --reporter=default --reporter=junit --outputFile=test-report.junit.xml
91+
run: vp test --project nuxt --coverage --reporter=default --reporter=junit --outputFile=test-report.junit.xml
11292

11393
- name: ⬆︎ Upload coverage reports to Codecov
11494
uses: codecov/codecov-action@671740ac38dd9b0130fbe1cec585b89eea48d3de # v5
@@ -131,23 +111,18 @@ jobs:
131111
steps:
132112
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
133113

134-
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
114+
- uses: voidzero-dev/setup-vp@af9f92ccd3e5694c919913c47be133a1847ea58e # v1
135115
with:
136116
node-version: lts/*
137-
138-
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # 5e1c8eafbd745f64b1ef30a7d7ed7965034c486c
139-
name: 🟧 Install pnpm
140-
141-
- name: 📦 Install dependencies
142-
run: pnpm install
117+
cache: true
143118

144119
- name: 🏗️ Build project
145-
run: pnpm vp run build:test
120+
run: vp run build:test
146121
env:
147122
VALIDATE_HTML: true
148123

149124
- name: 🖥️ Test project (browser)
150-
run: pnpm vp run test:browser:prebuilt
125+
run: vp run test:browser:prebuilt
151126

152127
a11y:
153128
name: ♿ Accessibility audit
@@ -159,21 +134,16 @@ jobs:
159134
steps:
160135
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
161136

162-
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
137+
- uses: voidzero-dev/setup-vp@af9f92ccd3e5694c919913c47be133a1847ea58e # v1
163138
with:
164139
node-version: lts/*
165-
166-
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # 5e1c8eafbd745f64b1ef30a7d7ed7965034c486c
167-
name: 🟧 Install pnpm
168-
169-
- name: 📦 Install dependencies
170-
run: pnpm install
140+
cache: true
171141

172142
- name: 🏗️ Build project
173-
run: pnpm vp run build:test
143+
run: vp run build:test
174144

175145
- name: ♿ Accessibility audit (Lighthouse - ${{ matrix.mode }} mode)
176-
run: pnpm vp run test:a11y:prebuilt
146+
run: vp run test:a11y:prebuilt
177147
env:
178148
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
179149
LIGHTHOUSE_COLOR_MODE: ${{ matrix.mode }}
@@ -185,18 +155,13 @@ jobs:
185155
steps:
186156
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
187157

188-
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
158+
- uses: voidzero-dev/setup-vp@af9f92ccd3e5694c919913c47be133a1847ea58e # v1
189159
with:
190160
node-version: lts/*
191-
192-
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # 5e1c8eafbd745f64b1ef30a7d7ed7965034c486c
193-
name: 🟧 Install pnpm
194-
195-
- name: 📦 Install dependencies
196-
run: pnpm install
161+
cache: true
197162

198163
- name: 🧹 Check for unused code
199-
run: pnpm vp run knip
164+
run: vp run knip
200165

201166
i18n:
202167
name: 🌐 i18n validation
@@ -205,20 +170,15 @@ jobs:
205170
steps:
206171
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
207172

208-
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
173+
- uses: voidzero-dev/setup-vp@af9f92ccd3e5694c919913c47be133a1847ea58e # v1
209174
with:
210175
node-version: lts/*
211-
212-
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # 5e1c8eafbd745f64b1ef30a7d7ed7965034c486c
213-
name: 🟧 Install pnpm
214-
215-
- name: 📦 Install dependencies (root only, no scripts)
216-
run: pnpm install --filter . --ignore-scripts
176+
cache: true
217177

218178
- name: 🌐 Check for missing or dynamic i18n keys
219-
run: pnpm vp run i18n:report
179+
run: vp run i18n:report
220180

221181
- name: 🌐 Check i18n schema is up to date
222182
run: |
223-
pnpm vp run i18n:schema
183+
vp run i18n:schema
224184
git diff --exit-code i18n/schema.json

.github/workflows/lunaria.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,10 @@ jobs:
2828
# Makes the action clone the entire git history
2929
fetch-depth: 0
3030

31-
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
31+
- uses: voidzero-dev/setup-vp@af9f92ccd3e5694c919913c47be133a1847ea58e # v1
3232
with:
3333
node-version: lts/*
34-
35-
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # 5e1c8eafbd745f64b1ef30a7d7ed7965034c486c
36-
name: 🟧 Install pnpm
37-
38-
- name: 📦 Install dependencies
39-
run: pnpm install
34+
cache: true
4035

4136
- name: Generate Lunaria Overview
4237
uses: lunariajs/action@4911ad0736d1e3b20af4cb70f5079aea2327ed8e # v1-prerelease

.github/workflows/release-pr.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,10 @@ jobs:
2020
with:
2121
fetch-depth: 0
2222

23-
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
23+
- uses: voidzero-dev/setup-vp@af9f92ccd3e5694c919913c47be133a1847ea58e # v1
2424
with:
2525
node-version: lts/*
26+
cache: true
2627

2728
- name: 🔍 Check for unreleased commits
2829
id: check

.github/workflows/release-tag.yml

Lines changed: 5 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,10 @@ jobs:
2323
with:
2424
fetch-depth: 0
2525

26-
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
26+
- uses: voidzero-dev/setup-vp@af9f92ccd3e5694c919913c47be133a1847ea58e # v1
2727
with:
2828
node-version: lts/*
29+
cache: true
2930

3031
- name: 🔢 Determine next version
3132
id: version
@@ -58,14 +59,6 @@ jobs:
5859
git tag -a "$VERSION" -m "Release $VERSION"
5960
git push origin "$VERSION"
6061
61-
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # 5e1c8eafbd745f64b1ef30a7d7ed7965034c486c
62-
if: steps.check.outputs.skip == 'false'
63-
name: 🟧 Install pnpm
64-
65-
- name: 📦 Install dependencies
66-
if: steps.check.outputs.skip == 'false'
67-
run: pnpm vp install --filter . --ignore-scripts
68-
6962
- name: 📝 Generate release notes
7063
if: steps.check.outputs.skip == 'false'
7164
env:
@@ -98,19 +91,12 @@ jobs:
9891
with:
9992
ref: release
10093

101-
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
94+
- uses: voidzero-dev/setup-vp@af9f92ccd3e5694c919913c47be133a1847ea58e # v1
10295
with:
10396
node-version: lts/*
97+
cache: true
10498
registry-url: https://registry.npmjs.org
10599

106-
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # 5e1c8eafbd745f64b1ef30a7d7ed7965034c486c
107-
name: 🟧 Install pnpm
108-
with:
109-
cache: false
110-
111-
- name: 📦 Install dependencies
112-
run: pnpm install --filter npmx-connector...
113-
114100
- name: 🔢 Set connector version
115101
env:
116102
VERSION: ${{ needs.tag.outputs.version }}
@@ -122,7 +108,7 @@ jobs:
122108
echo "Publishing npmx-connector@${PKG_VERSION}"
123109
124110
- name: 🏗️ Build connector
125-
run: pnpm --filter npmx-connector build
111+
run: vp run --filter npmx-connector build
126112

127113
- name: 📤 Publish to npm with provenance
128114
# Uses OIDC trusted publishing — no NPM_TOKEN needed.

0 commit comments

Comments
 (0)