From 693616b00dbfc065d656ced67817d2f576813b56 Mon Sep 17 00:00:00 2001 From: Alois Klink Date: Wed, 28 Sep 2022 20:19:08 +0100 Subject: [PATCH] ci(e2e): Skip pnpm cache if skipping cypress run When running the e2e action from a fork, we prevent multi-processing in the E2E cypress tests skipping runs that aren't matrix.container == 1. However, this means that the pnpm cache folder isn't created, causing the cache action to throw an error. To fix this, we also skip building Node/cache setup step. Fixes: f60c7fff65458f39f17cbba30127dacd21a982ac --- .github/workflows/e2e.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 0b44c53c6..8925a828d 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -21,6 +21,9 @@ jobs: - name: Setup Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 + # Need to skip setup if Cypress run is skipped, otherwise an error + # is thrown since the pnpm cache step fails + if: ${{ ( env.CYPRESS_RECORD_KEY != '' ) || ( matrix.containers == 1 ) }} with: cache: pnpm node-version: ${{ matrix.node-version }}