Skip to content

Commit

Permalink
ci: how about skipping playground cache?
Browse files Browse the repository at this point in the history
  • Loading branch information
haoqunjiang committed Dec 18, 2024
1 parent 8cf9707 commit 30e5c0e
Showing 1 changed file with 12 additions and 22 deletions.
34 changes: 12 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,16 +58,12 @@ jobs:
- uses: actions/cache/restore@v4
id: cache-restore
with:
path: |
outfile.cjs
playground
path: outfile.cjs
key: ${{ github.sha }}-${{ hashFiles('pnpm-lock.yaml') }}
- name: Build the package on cache miss
if: steps.cache-restore.outputs.cache-hit != 'true'
run: pnpm install && pnpm build && pnpm snapshot && echo "{}" > playground/package.json
- name: Move playground to an outside directory to work around working-directory issue
if: steps.cache-restore.outputs.cache-hit != 'true'
run: mv playground ../playground
run: pnpm install && pnpm build
- name: Snapshot
run: pnpm snapshot && echo "{}" > playground/package.json && mv playground ../playground
- name: Install dependencies in playground
working-directory: ../playground
run: pnpm install --no-frozen-lockfile
Expand Down Expand Up @@ -98,16 +94,13 @@ jobs:
- uses: actions/cache/restore@v4
id: cache-restore
with:
path: |
outfile.cjs
../playground
path: outfile.cjs
key: ${{ github.sha }}-${{ hashFiles('pnpm-lock.yaml') }}
- name: Build the package on cache miss
if: steps.cache-restore.outputs.cache-hit != 'true'
run: pnpm install && pnpm build && pnpm snapshot && echo "{}" > playground/package.json
- name: Move playground to an outside directory to work around working-directory issue
if: steps.cache-restore.outputs.cache-hit != 'true'
run: mv playground ../playground
run: pnpm install && pnpm build
- name: Snapshot
run: pnpm snapshot && echo "{}" > playground/package.json && mv playground ../playground
- name: Install dependencies in playground
working-directory: ../playground
run: pnpm install --no-frozen-lockfile
Expand Down Expand Up @@ -143,16 +136,13 @@ jobs:
- uses: actions/cache/restore@v4
id: cache-restore
with:
path: |
outfile.cjs
playground
path: outfile.cjs
key: ${{ github.sha }}-${{ hashFiles('pnpm-lock.yaml') }}
- name: Build the package on cache miss
if: steps.cache-restore.outputs.cache-hit != 'true'
run: pnpm install && pnpm build && pnpm snapshot && echo "{}" > playground/package.json
- name: Move playground to an outside directory to work around working-directory issue
if: steps.cache-restore.outputs.cache-hit != 'true'
run: mv playground ../playground
run: pnpm install && pnpm build
- name: Snapshot
run: pnpm snapshot && echo "{}" > playground/package.json && mv playground ../playground
- name: Install dependencies in playground
working-directory: ../playground
run: pnpm install --no-frozen-lockfile
Expand Down

0 comments on commit 30e5c0e

Please sign in to comment.