Skip to content

Commit 689b192

Browse files
chenjiahanfi3ework
authored andcommitted
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 3c3f0fe commit 689b192

10 files changed

Lines changed: 10 additions & 0 deletions

File tree

.github/actions/build-rsbuild/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/rsdoctor/rsbuild.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/rsbuild',
88
branch: process.env.RSBUILD ?? 'main',
9+
build: 'node --run build',
910
test: ['e2e rsdoctor'],
1011
});
1112
}

tests/rslib/rsbuild.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/rsbuild',
88
branch: process.env.RSBUILD ?? 'main',
9+
build: 'node --run build',
910
test: ['test', 'e2e'],
1011
});
1112
}

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/rsbuild.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/rsbuild',
88
branch: process.env.RSBUILD_REF ?? 'main',
9+
build: 'node --run build',
910
test: ['e2e'],
1011
});
1112
}

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/rsbuild.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/rsbuild',
88
branch: process.env.RSBUILD ?? 'main',
9+
build: 'node --run build',
910
beforeTest: async () => {
1011
cd('./website');
1112
},

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
},

tests/rstest/rsbuild.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/rsbuild',
88
branch: process.env.RSBUILD ?? 'main',
9+
build: 'node --run build',
910
test: ['test'],
1011
});
1112
}

0 commit comments

Comments
 (0)