Skip to content

Commit

Permalink
feat: add cache
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentdchan committed Nov 13, 2023
1 parent 7b0b397 commit 24da9dd
Showing 1 changed file with 36 additions and 9 deletions.
45 changes: 36 additions & 9 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,39 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- run: npm install -g pnpm
- run: pnpm install --frozen-lockfile
- run: npx playwright install chromium
- run: pnpm run build
- run: pnpm run lint
- run: pnpm run test:unit
- run: pnpm run test:e2e
- run: pnpm -r --if-present run check
- run: chmod +x ./bundle_size.sh && ./bundle_size.sh

- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 8
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install
run: |
npm install -g pnpm
pnpm install --frozen-lockfile
npx playwright install chromium
- name: Build and Test
- run: |
pnpm run build
pnpm run lint
pnpm run test:unit
pnpm run test:e2e
pnpm -r --if-present run check
- name: Bundle Size
run: chmod +x ./bundle_size.sh && ./bundle_size.sh

1 comment on commit 24da9dd

@vercel
Copy link

@vercel vercel bot commented on 24da9dd Nov 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.