File tree Expand file tree Collapse file tree 3 files changed +16
-6
lines changed Expand file tree Collapse file tree 3 files changed +16
-6
lines changed Original file line number Diff line number Diff line change 63
63
- run : pnpm -C packages/plugin-rsc exec playwright install ${{ matrix.browser }}
64
64
- run : pnpm -C packages/plugin-rsc test-e2e-ci --project=${{ matrix.browser }}
65
65
env :
66
- TEST_ISOLATED : ${{ matrix.os != 'windows-latest' }}
66
+ TEST_ISOLATED : true
67
67
- uses : actions/upload-artifact@v4
68
68
if : always()
69
69
with :
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ import { readFileSync } from 'node:fs'
3
3
import { type Page , expect , test } from '@playwright/test'
4
4
import { type Fixture , setupIsolatedFixture , useFixture } from './fixture'
5
5
import { expectNoReload , testNoJs , waitForHydration } from './helper'
6
+ import path from 'node:path'
7
+ import os from 'node:os'
6
8
7
9
// TODO: parallel?
8
10
// TODO: all tests don't need to be tested in all variants?
@@ -107,7 +109,12 @@ test.describe(() => {
107
109
// disabled by default
108
110
if ( process . env . TEST_ISOLATED !== 'true' ) return
109
111
110
- let tmpRoot = '/tmp/test-vite-rsc'
112
+ // use RUNNER_TEMP on Github Actions
113
+ // https://github.com/actions/toolkit/issues/518
114
+ const tmpRoot = path . join (
115
+ process . env [ 'RUNNER_TEMP' ] || os . tmpdir ( ) ,
116
+ 'test-vite-rsc' ,
117
+ )
111
118
test . beforeAll ( async ( ) => {
112
119
await setupIsolatedFixture ( { src : 'examples/basic' , dest : tmpRoot } )
113
120
} )
Original file line number Diff line number Diff line change @@ -153,10 +153,9 @@ export async function setupIsolatedFixture(options: {
153
153
} ) {
154
154
// copy fixture
155
155
fs . rmSync ( options . dest , { recursive : true , force : true } )
156
- fs . cpSync ( options . src , options . dest , { recursive : true } )
157
- fs . rmSync ( path . join ( options . dest , 'node_modules' ) , {
156
+ fs . cpSync ( options . src , options . dest , {
158
157
recursive : true ,
159
- force : true ,
158
+ filter : ( src ) => ! src . includes ( 'node_modules' ) ,
160
159
} )
161
160
162
161
// setup package.json overrides
@@ -174,7 +173,11 @@ export async function setupIsolatedFixture(options: {
174
173
throwOnError : true ,
175
174
nodeOptions : {
176
175
cwd : options . dest ,
177
- stdio : process . env . TEST_DEBUG ? 'inherit' : undefined ,
176
+ stdio : [
177
+ 'ignore' ,
178
+ process . env . TEST_DEBUG ? 'inherit' : 'ignore' ,
179
+ 'inherit' ,
180
+ ] ,
178
181
} ,
179
182
} )
180
183
}
You can’t perform that action at this time.
0 commit comments