Skip to content

Commit ac2b617

Browse files
authored
ci: use voidzero-dev/setup-vp instead of setup-node + pnpm/action-setup (#109)
## What 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. ## Why Simplifies CI setup to a single step with \`node-version\`, \`cache\`, and automatic dependency installation via \`vp\`. Based on [npmx-dev/npmx.dev#2145](npmx-dev/npmx.dev#2145). ## Changes - **continuous-integration.yml**: 7 jobs migrated (lint, unit, test, browser, benchmark, a11y, knip) - **autofix.yml**: Replaced 3-step setup with single \`setup-vp\` - **release-tag.yml**: Replaced \`setup-node\` + \`pnpm/action-setup\` with \`setup-vp\` - **release-pr.yml**: Replaced \`setup-node\` with \`setup-vp\` ### Key patterns - \`cache: true\` for jobs needing full dependency install (auto-runs \`vp install\`) - \`run-install: false\` for jobs with partial install (\`vp install --filter . --ignore-scripts\`) - \`pnpm vp run/test/exec\` -> \`vp run/test/exec\` - Pinned to \`v1.6.0\` (\`8ecb3917\`) ## Impact CI-only change. No runtime code changes. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Chores** * Updated CI/CD workflow tooling and infrastructure configurations across automated build and testing pipelines to improve consistency and efficiency. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
1 parent 87398df commit ac2b617

4 files changed

Lines changed: 35 additions & 74 deletions

File tree

.github/workflows/autofix.yml

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,12 @@ jobs:
1919
steps:
2020
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2121

22-
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
22+
- uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1.6.0
2323
with:
2424
node-version: lts/*
25-
26-
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # 4e1c8eafbd745f64b1ef30a7d7ed7965034c486c
27-
name: 🟧 Install pnpm
28-
29-
- name: 📦 Install dependencies
30-
run: pnpm install
25+
cache: true
3126

3227
- name: 🔠 Fix lint errors
33-
run: pnpm vp run lint:fix
28+
run: vp run lint:fix
3429

3530
- uses: autofix-ci/action@635ffb0c9798bd160680f18fd73371e355b85f27

.github/workflows/continuous-integration.yml

Lines changed: 27 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -28,18 +28,16 @@ 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@8ecb39174989ce55af90f45cf55b02738599831d # v1.6.0
3232
with:
3333
node-version: lts/*
34-
35-
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # 5e1c8eafbd745f64b1ef30a7d7ed7965034c486c
36-
name: 🟧 Install pnpm
34+
run-install: false
3735

3836
- name: 📦 Install dependencies (root only, no scripts)
39-
run: pnpm install --filter . --ignore-scripts
37+
run: vp install --filter . --ignore-scripts
4038

4139
- name: 🔠 Lint project
42-
run: pnpm vp run lint
40+
run: vp run lint
4341

4442
unit:
4543
name: 🧪 Unit tests
@@ -48,18 +46,13 @@ jobs:
4846
steps:
4947
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
5048

51-
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
49+
- uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1.6.0
5250
with:
5351
node-version: lts/*
54-
55-
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # 5e1c8eafbd745f64b1ef30a7d7ed7965034c486c
56-
name: 🟧 Install pnpm
57-
58-
- name: 📦 Install dependencies
59-
run: pnpm install
52+
cache: true
6053

6154
- name: 🧪 Unit tests
62-
run: pnpm vp test --project unit --coverage --reporter=default --reporter=junit --outputFile=test-report.junit.xml
55+
run: vp test --project unit --coverage --reporter=default --reporter=junit --outputFile=test-report.junit.xml
6356

6457
- name: ⬆︎ Upload test results to Codecov
6558
if: ${{ !cancelled() }}
@@ -74,21 +67,16 @@ jobs:
7467
steps:
7568
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
7669

77-
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
70+
- uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1.6.0
7871
with:
7972
node-version: lts/*
80-
81-
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # 5e1c8eafbd745f64b1ef30a7d7ed7965034c486c
82-
name: 🟧 Install pnpm
83-
84-
- name: 📦 Install dependencies
85-
run: pnpm install
73+
cache: true
8674

8775
- name: 🌐 Install browser
88-
run: pnpm vp exec playwright install chromium-headless-shell
76+
run: vp exec playwright install chromium-headless-shell
8977

9078
- name: 🧪 Component tests
91-
run: pnpm vp test --project nuxt --coverage --reporter=default --reporter=junit --outputFile=test-report.junit.xml
79+
run: vp test --project nuxt --coverage --reporter=default --reporter=junit --outputFile=test-report.junit.xml
9280
env:
9381
NODE_OPTIONS: --max-old-space-size=8192
9482

@@ -113,29 +101,24 @@ jobs:
113101
steps:
114102
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
115103

116-
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
104+
- uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1.6.0
117105
with:
118106
node-version: lts/*
119-
120-
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # 5e1c8eafbd745f64b1ef30a7d7ed7965034c486c
121-
name: 🟧 Install pnpm
122-
123-
- name: 📦 Install dependencies
124-
run: pnpm install
107+
cache: true
125108

126109
- name: 🔼 Generate Prisma Client
127-
run: pnpm prisma:generate
110+
run: vp run prisma:generate
128111

129112
- name: 🏗️ Build project
130-
run: pnpm vp run build:test
113+
run: vp run build:test
131114
env:
132115
VALIDATE_HTML: true
133116
NODE_OPTIONS: --max-old-space-size=4096
134117
NUXT_PUBLIC_SITE_URL: https://wolfstar.rocks
135118
NUXT_SESSION_PASSWORD: ci-test-session-password-at-least-32-characters-long
136119

137120
- name: 🖥️ Test project (browser)
138-
run: pnpm vp run test:browser:prebuilt
121+
run: vp run test:browser:prebuilt
139122
env:
140123
NUXT_SESSION_PASSWORD: ci-test-session-password-at-least-32-characters-long
141124

@@ -146,21 +129,16 @@ jobs:
146129
steps:
147130
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
148131

149-
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
132+
- uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1.6.0
150133
with:
151134
node-version: lts/*
152-
153-
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # 5e1c8eafbd745f64b1ef30a7d7ed7965034c486c
154-
name: 🟧 Install pnpm
155-
156-
- name: 📦 Install dependencies
157-
run: pnpm install
135+
cache: true
158136

159137
- name: ⚡ Run benchmarks
160138
uses: CodSpeedHQ/action@4deb3275dd364fb96fb074c953133d29ec96f80f
161139
with:
162140
mode: simulation
163-
run: pnpm vp run test:bench
141+
run: vp run test:bench
164142

165143
a11y:
166144
name: ♿ Accessibility audit
@@ -172,27 +150,22 @@ jobs:
172150
steps:
173151
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
174152

175-
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
153+
- uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1.6.0
176154
with:
177155
node-version: lts/*
178-
179-
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # 5e1c8eafbd745f64b1ef30a7d7ed7965034c486c
180-
name: 🟧 Install pnpm
181-
182-
- name: 📦 Install dependencies
183-
run: pnpm install
156+
cache: true
184157

185158
- name: 🔼 Generate Prisma Client
186-
run: pnpm prisma:generate
159+
run: vp run prisma:generate
187160

188161
- name: 🏗️ Build project
189-
run: pnpm vp run build:test
162+
run: vp run build:test
190163
env:
191164
NUXT_PUBLIC_SITE_URL: https://wolfstar.rocks
192165
NUXT_SESSION_PASSWORD: ci-test-session-password-at-least-32-characters-long
193166

194167
- name: ♿ Accessibility audit (Lighthouse - ${{ matrix.mode }} mode)
195-
run: pnpm vp run test:a11y:prebuilt
168+
run: vp run test:a11y:prebuilt
196169
env:
197170
LHCI_GITHUB_APP_TOKEN: ${{ secrets.LHCI_GITHUB_APP_TOKEN }}
198171
LIGHTHOUSE_COLOR_MODE: ${{ matrix.mode }}
@@ -205,15 +178,10 @@ jobs:
205178
steps:
206179
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
207180

208-
- uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.0
181+
- uses: voidzero-dev/setup-vp@8ecb39174989ce55af90f45cf55b02738599831d # v1.6.0
209182
with:
210183
node-version: lts/*
211-
212-
- uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320 # 5e1c8eafbd745f64b1ef30a7d7ed7965034c486c
213-
name: 🟧 Install pnpm
214-
215-
- name: 📦 Install dependencies
216-
run: pnpm install
184+
cache: true
217185

218186
- name: 🧹 Check for unused code
219-
run: pnpm vp run knip
187+
run: vp run knip

.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@8ecb39174989ce55af90f45cf55b02738599831d # v1.6.0
2424
with:
2525
node-version: lts/*
26+
run-install: false
2627

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

.github/workflows/release-tag.yml

Lines changed: 3 additions & 6 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@8ecb39174989ce55af90f45cf55b02738599831d # v1.6.0
2727
with:
2828
node-version: lts/*
29+
run-install: false
2930

3031
- name: 🔢 Determine next version
3132
id: version
@@ -58,13 +59,9 @@ jobs:
5859
git tag -a "$VERSION" -m "Release $VERSION"
5960
git push origin "$VERSION"
6061
61-
- uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4
62-
if: steps.check.outputs.skip == 'false'
63-
name: 🟧 Install pnpm
64-
6562
- name: 📦 Install dependencies
6663
if: steps.check.outputs.skip == 'false'
67-
run: pnpm install --filter . --ignore-scripts
64+
run: vp install --filter . --ignore-scripts
6865

6966
- name: 📝 Generate release notes
7067
if: steps.check.outputs.skip == 'false'

0 commit comments

Comments
 (0)