From 549d5a3198a76fb1630769b0de121fcf35f9bc80 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Fri, 25 Aug 2023 18:20:17 +0800 Subject: [PATCH] fix(workflows): pnpm cache --- .../workflows/playwright-test-workflow.yml | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/.github/workflows/playwright-test-workflow.yml b/.github/workflows/playwright-test-workflow.yml index c429740344..60957b376c 100644 --- a/.github/workflows/playwright-test-workflow.yml +++ b/.github/workflows/playwright-test-workflow.yml @@ -16,20 +16,27 @@ jobs: runs-on: [self-hosted, v2] timeout-minutes: 100 steps: + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: 18.14.0 - name: Setup pnpm uses: pnpm/action-setup@v2 with: version: 8 - - name: Setup Node - uses: actions/setup-node@v3 + - 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: - 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 uses: actions/checkout@v3 - - name: Cache node modules - uses: actions/cache@v3 - env: - cache-name: cache-node-modules - name: setup pg if: ${{ inputs.db == 'pg' || ( inputs.db == 'sqlite' && inputs.shard == '1' ) }} working-directory: ./