Add cypress install step to e2e test CI job
Description
After migrating from GitLab CI runners to Hetzner, the e2e-ce-ui-test job stopped working with the following error:
> @postgres.ai/ce@1.0.0 cy:run /builds/postgres-ai/database-lab/ui/packages/ce
> pnpm cypress run
The cypress npm package is installed, but the Cypress binary is missing.
We expected the binary to be installed here: /builds/postgres-ai/database-lab/cache/Cypress/12.17.4/Cypress/Cypress
Reasons it may be missing:
- You're caching 'node_modules' but are not caching this path: /root/.cache/Cypress
- You ran 'npm install' at an earlier build step but did not persist: /root/.cache/Cypress
Properly caching the binary will fix this error and avoid downloading and unzipping Cypress.
Alternatively, you can run 'cypress install' to download the binary again.
https://on.cypress.io/not-installed-ci-error
----------
Platform: linux-x64 (Debian - 12.2)
Cypress Version: 12.17.4
/builds/postgres-ai/database-lab/ui/packages/ce:
ERR_PNPM_RECURSIVE_RUN_FIRST_FAIL @postgres.ai/ce@1.0.0 cy:run: `pnpm cypress run`
Exit status 1
https://gitlab.com/postgres-ai/database-lab/-/jobs/9185574220
The main issue is that pnpm cannot find the Cypress binary in the cache. The ideal solution would be to fix the cache, but I couldn’t manage to do that. In the end, I simply added Cypress installation, which unblocked the pipeline.
Checklist
-
MR description has been reviewed -
MR changes are functionally tested -
MR does NOT have API/CLI changes OR there are API/CLI changes and they have been reviewed & DOCS ARE ADJUSTED (reference doc, etc) -
MR does NOT have UI changes OR there are UI changes and they have been reviewed & UX IS REVIEWED