From d926144e13056bd0f032704a446f031485894214 Mon Sep 17 00:00:00 2001 From: Anders Kaseorg Date: Wed, 31 May 2023 09:53:44 -0700 Subject: [PATCH] ci: Fix pnpm store path for GitHub Actions. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This would ordinarily be determined by running ‘pnpm store path’, but pnpm is not installed yet at that point. Signed-off-by: Anders Kaseorg --- .github/workflows/production-suite.yml | 8 +++++++- .github/workflows/zulip-ci.yml | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/production-suite.yml b/.github/workflows/production-suite.yml index 355222a2ba..672a6605a5 100644 --- a/.github/workflows/production-suite.yml +++ b/.github/workflows/production-suite.yml @@ -75,7 +75,7 @@ jobs: - name: Restore pnpm store uses: actions/cache@v3 with: - path: ~/.local/share/pnpm/store + path: /__w/.pnpm-store key: v1-pnpm-store-focal-${{ hashFiles('pnpm-lock.yaml') }} - name: Restore python cache @@ -102,6 +102,12 @@ jobs: path: /tmp/production-build retention-days: 1 + - name: Verify pnpm store path + run: | + set -x + path="$(pnpm store path)" + [[ "$path" == /__w/.pnpm-store/* ]] + - name: Generate failure report string id: failure_report_string if: ${{ failure() && github.repository == 'zulip/zulip' && github.event_name == 'push' }} diff --git a/.github/workflows/zulip-ci.yml b/.github/workflows/zulip-ci.yml index 4d47ed74f2..8d3b68081e 100644 --- a/.github/workflows/zulip-ci.yml +++ b/.github/workflows/zulip-ci.yml @@ -79,7 +79,7 @@ jobs: - name: Restore pnpm store uses: actions/cache@v3 with: - path: ~/.local/share/pnpm/store + path: /__w/.pnpm-store key: v1-pnpm-store-${{ matrix.os }}-${{ hashFiles('pnpm-lock.yaml') }} - name: Restore python cache @@ -245,6 +245,12 @@ jobs: - name: Check development database build run: ./tools/ci/setup-backend + - name: Verify pnpm store path + run: | + set -x + path="$(pnpm store path)" + [[ "$path" == /__w/.pnpm-store/* ]] + - name: Generate failure report string id: failure_report_string if: ${{ failure() && github.repository == 'zulip/zulip' && github.event_name == 'push' }}