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: f60c7fff65
This commit is contained in:
Alois Klink
2022-09-28 20:19:08 +01:00
parent 30f6550e61
commit 693616b00d

View File

@@ -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 }}