Skip to content

Commit 30e5c0e

Browse files
committed
ci: how about skipping playground cache?
1 parent 8cf9707 commit 30e5c0e

File tree

1 file changed

+12
-22
lines changed

1 file changed

+12
-22
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -58,16 +58,12 @@ jobs:
5858
- uses: actions/cache/restore@v4
5959
id: cache-restore
6060
with:
61-
path: |
62-
outfile.cjs
63-
playground
61+
path: outfile.cjs
6462
key: ${{ github.sha }}-${{ hashFiles('pnpm-lock.yaml') }}
6563
- name: Build the package on cache miss
66-
if: steps.cache-restore.outputs.cache-hit != 'true'
67-
run: pnpm install && pnpm build && pnpm snapshot && echo "{}" > playground/package.json
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
64+
run: pnpm install && pnpm build
65+
- name: Snapshot
66+
run: pnpm snapshot && echo "{}" > playground/package.json && mv playground ../playground
7167
- name: Install dependencies in playground
7268
working-directory: ../playground
7369
run: pnpm install --no-frozen-lockfile
@@ -98,16 +94,13 @@ jobs:
9894
- uses: actions/cache/restore@v4
9995
id: cache-restore
10096
with:
101-
path: |
102-
outfile.cjs
103-
../playground
97+
path: outfile.cjs
10498
key: ${{ github.sha }}-${{ hashFiles('pnpm-lock.yaml') }}
10599
- name: Build the package on cache miss
106100
if: steps.cache-restore.outputs.cache-hit != 'true'
107-
run: pnpm install && pnpm build && pnpm snapshot && echo "{}" > playground/package.json
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
101+
run: pnpm install && pnpm build
102+
- name: Snapshot
103+
run: pnpm snapshot && echo "{}" > playground/package.json && mv playground ../playground
111104
- name: Install dependencies in playground
112105
working-directory: ../playground
113106
run: pnpm install --no-frozen-lockfile
@@ -143,16 +136,13 @@ jobs:
143136
- uses: actions/cache/restore@v4
144137
id: cache-restore
145138
with:
146-
path: |
147-
outfile.cjs
148-
playground
139+
path: outfile.cjs
149140
key: ${{ github.sha }}-${{ hashFiles('pnpm-lock.yaml') }}
150141
- name: Build the package on cache miss
151142
if: steps.cache-restore.outputs.cache-hit != 'true'
152-
run: pnpm install && pnpm build && pnpm snapshot && echo "{}" > playground/package.json
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
143+
run: pnpm install && pnpm build
144+
- name: Snapshot
145+
run: pnpm snapshot && echo "{}" > playground/package.json && mv playground ../playground
156146
- name: Install dependencies in playground
157147
working-directory: ../playground
158148
run: pnpm install --no-frozen-lockfile

0 commit comments

Comments
 (0)