@@ -65,12 +65,15 @@ jobs:
65
65
- name : Build the package on cache miss
66
66
if : steps.cache-restore.outputs.cache-hit != 'true'
67
67
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
68
71
- name : Install dependencies in playground
69
- working-directory : ./playground
72
+ working-directory : .. /playground
70
73
run : pnpm install --no-frozen-lockfile
71
74
72
75
- name : Run build script in playground
73
- working-directory : ./playground
76
+ working-directory : .. /playground
74
77
run : pnpm --filter "*" build
75
78
76
79
test-vitest :
@@ -97,21 +100,24 @@ jobs:
97
100
with :
98
101
path : |
99
102
outfile.cjs
100
- playground
103
+ ../ playground
101
104
key : ${{ github.sha }}-${{ hashFiles('pnpm-lock.yaml') }}
102
105
- name : Build the package on cache miss
103
106
if : steps.cache-restore.outputs.cache-hit != 'true'
104
107
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
105
111
- name : Install dependencies in playground
106
- working-directory : ./playground
112
+ working-directory : .. /playground
107
113
run : pnpm install --no-frozen-lockfile
108
114
- name : Run test:unit script in vitest projects
109
- working-directory : ./playground
115
+ working-directory : .. /playground
110
116
run : pnpm --filter "{*vitest*}" test:unit
111
117
112
118
# FIXME: it's failing now
113
119
# - name: Run test:unit script in with-tests projects
114
- # working-directory: ./playground
120
+ # working-directory: .. /playground
115
121
# run: pnpm --filter "{*with-tests*}" test:unit
116
122
117
123
test-e2e :
@@ -144,8 +150,11 @@ jobs:
144
150
- name : Build the package on cache miss
145
151
if : steps.cache-restore.outputs.cache-hit != 'true'
146
152
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
147
156
- name : Install dependencies in playground
148
- working-directory : ./playground
157
+ working-directory : .. /playground
149
158
run : pnpm install --no-frozen-lockfile
150
159
151
160
# https://github.com/vitejs/vite/blob/main/.github/workflows/ci.yml#L62
@@ -180,19 +189,19 @@ jobs:
180
189
181
190
- name : Download Cypress
182
191
if : ${{ contains(matrix.e2e-framework, 'cypress') }}
183
- working-directory : ./playground
192
+ working-directory : .. /playground
184
193
run : |
185
194
pnpm --filter "{cypress}" exec cypress cache list
186
195
pnpm --filter "{cypress}" exec cypress install
187
196
188
197
- if : ${{ contains(matrix.e2e-framework, 'playwright') }}
189
198
name : Install Playwright dependencies
190
- working-directory : ./playground
199
+ working-directory : .. /playground
191
200
run : pnpm --filter "{playwright}" exec playwright install --with-deps
192
201
193
202
# Run `test:e2e` in project folders contain `matrix.e2e-framework`
194
203
- name : Run e2e test script
195
- working-directory : ./playground
204
+ working-directory : .. /playground
196
205
run : pnpm --filter "{*${{ matrix.e2e-framework }}*}" test:e2e
197
206
198
207
# FIXME: `--with-tests` folders
0 commit comments