Browse Source

fix(workflows): pnpm cache

pull/5903/head
Wing-Kam Wong 1 year ago
parent
commit
549d5a3198
  1. 21
      .github/workflows/playwright-test-workflow.yml

21
.github/workflows/playwright-test-workflow.yml

@ -16,20 +16,27 @@ jobs:
runs-on: [self-hosted, v2] runs-on: [self-hosted, v2]
timeout-minutes: 100 timeout-minutes: 100
steps: steps:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18.14.0
- name: Setup pnpm - name: Setup pnpm
uses: pnpm/action-setup@v2 uses: pnpm/action-setup@v2
with: with:
version: 8 version: 8
- name: Setup Node - name: Get pnpm store directory
uses: actions/setup-node@v3 shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with: with:
node-version: 18.14.0 path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
- name: Cache node modules
uses: actions/cache@v3
env:
cache-name: cache-node-modules
- name: setup pg - name: setup pg
if: ${{ inputs.db == 'pg' || ( inputs.db == 'sqlite' && inputs.shard == '1' ) }} if: ${{ inputs.db == 'pg' || ( inputs.db == 'sqlite' && inputs.shard == '1' ) }}
working-directory: ./ working-directory: ./

Loading…
Cancel
Save