Skip to content

Commit 0dce1da

Browse files
committed
fix: build rstest explicitly after install
Upstream moved `pnpm run build` out of rstest's root `prepare` script (web-infra-dev/rstest@569c2ce), so `pnpm i` alone no longer builds rstest. Mirror the rsbuild fix (#62): build rstest explicitly both as the subject (build-rstest action) and as a consumer suite (tests/*/rstest.ts), so @rstest/core ships its dist + type declarations and downstream tsc resolves it.
1 parent f0d685b commit 0dce1da

5 files changed

Lines changed: 5 additions & 0 deletions

File tree

.github/actions/build-rstest/action.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,4 @@ runs:
4040
run: |
4141
cd ${{ inputs.path }}
4242
pnpm i
43+
node --run build

tests/rsbuild/rstest.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export async function test(options: RunOptions) {
66
...options,
77
repo: 'web-infra-dev/rstest',
88
branch: process.env.RSTEST ?? 'main',
9+
build: 'node --run build',
910
// ignore snapshot changes
1011
test: ['test -u', 'test:examples'],
1112
beforeTest: async () => {

tests/rslib/rstest.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export async function test(options: RunOptions) {
66
...options,
77
repo: 'web-infra-dev/rstest',
88
branch: process.env.RSTEST ?? 'main',
9+
build: 'node --run build',
910
test: ['test', 'test:examples'],
1011
beforeTest: async () => {
1112
await $`pnpm exec playwright install chromium --with-deps`;

tests/rspack/rstest.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export async function test(options: RunOptions) {
66
...options,
77
repo: 'web-infra-dev/rstest',
88
branch: process.env.RSTEST ?? 'main',
9+
build: 'node --run build',
910
// ignore snapshot changes
1011
test: [
1112
'test -u',

tests/rspress/rstest.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ export async function test(options: RunOptions) {
66
...options,
77
repo: 'web-infra-dev/rstest',
88
branch: process.env.RSTEST ?? 'main',
9+
build: 'node --run build',
910
beforeTest: async () => {
1011
cd('./website');
1112
},

0 commit comments

Comments
 (0)