@@ -65,12 +65,15 @@ jobs:
6565 - name : Build the package on cache miss
6666 if : steps.cache-restore.outputs.cache-hit != 'true'
6767 run : pnpm install && pnpm build && pnpm snapshot
68+ - name : Move playground to an outside directory to work around working-directory issue
69+ if : steps.cache-restore.outputs.cache-hit != 'true'
70+ run : mv playground ../playground
6871 - name : Install dependencies in playground
69- working-directory : ./playground
72+ working-directory : .. /playground
7073 run : pnpm install --no-frozen-lockfile
7174
7275 - name : Run build script in playground
73- working-directory : ./playground
76+ working-directory : .. /playground
7477 run : pnpm --filter "*" build
7578
7679 test-vitest :
@@ -97,21 +100,24 @@ jobs:
97100 with :
98101 path : |
99102 outfile.cjs
100- playground
103+ ../ playground
101104 key : ${{ github.sha }}-${{ hashFiles('pnpm-lock.yaml') }}
102105 - name : Build the package on cache miss
103106 if : steps.cache-restore.outputs.cache-hit != 'true'
104107 run : pnpm install && pnpm build && pnpm snapshot
108+ - name : Move playground to an outside directory to work around working-directory issue
109+ if : steps.cache-restore.outputs.cache-hit != 'true'
110+ run : mv playground ../playground
105111 - name : Install dependencies in playground
106- working-directory : ./playground
112+ working-directory : .. /playground
107113 run : pnpm install --no-frozen-lockfile
108114 - name : Run test:unit script in vitest projects
109- working-directory : ./playground
115+ working-directory : .. /playground
110116 run : pnpm --filter "{*vitest*}" test:unit
111117
112118 # FIXME: it's failing now
113119 # - name: Run test:unit script in with-tests projects
114- # working-directory: ./playground
120+ # working-directory: .. /playground
115121 # run: pnpm --filter "{*with-tests*}" test:unit
116122
117123 test-e2e :
@@ -144,8 +150,11 @@ jobs:
144150 - name : Build the package on cache miss
145151 if : steps.cache-restore.outputs.cache-hit != 'true'
146152 run : pnpm install && pnpm build && pnpm snapshot
153+ - name : Move playground to an outside directory to work around working-directory issue
154+ if : steps.cache-restore.outputs.cache-hit != 'true'
155+ run : mv playground ../playground
147156 - name : Install dependencies in playground
148- working-directory : ./playground
157+ working-directory : .. /playground
149158 run : pnpm install --no-frozen-lockfile
150159
151160 # https://github.com/vitejs/vite/blob/main/.github/workflows/ci.yml#L62
@@ -180,19 +189,19 @@ jobs:
180189
181190 - name : Download Cypress
182191 if : ${{ contains(matrix.e2e-framework, 'cypress') }}
183- working-directory : ./playground
192+ working-directory : .. /playground
184193 run : |
185194 pnpm --filter "{cypress}" exec cypress cache list
186195 pnpm --filter "{cypress}" exec cypress install
187196
188197 - if : ${{ contains(matrix.e2e-framework, 'playwright') }}
189198 name : Install Playwright dependencies
190- working-directory : ./playground
199+ working-directory : .. /playground
191200 run : pnpm --filter "{playwright}" exec playwright install --with-deps
192201
193202 # Run `test:e2e` in project folders contain `matrix.e2e-framework`
194203 - name : Run e2e test script
195- working-directory : ./playground
204+ working-directory : .. /playground
196205 run : pnpm --filter "{*${{ matrix.e2e-framework }}*}" test:e2e
197206
198207 # FIXME: `--with-tests` folders
0 commit comments