Parallel workflow fails
MikeMcC399 opened this issue · comments
.github/workflows/parallel.yml is failing.
"The cypress npm package is installed, but the Cypress binary is missing."
See actions/workflows/parallel.yml
-
4728528638 was successful (chore(deps): update cypress to 12.10.0) in the
renovate/cypress
branch. -
4733087948 failed #640 on merge into the
master
branch.
Run npm start &
> cypress-example-kitchensink@0.0.0-development start
> node ./scripts/start.js
Running "serve --listen 8080 --no-request-logging --no-clipboard"...
The cypress npm package is installed, but the Cypress binary is missing.
We expected the binary to be installed here: /home/runner/.cache/Cypress/12.10.0/Cypress/Cypress
Reasons it may be missing:
- You're caching 'node_modules' but are not caching this path: /home/runner/.cache/Cypress
- You ran 'npm install' at an earlier build step but did not persist: /home/runner/.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 (Ubuntu - 22.04)
Cypress Version: 12.10.0
INFO Accepting connections at http://localhost:8080
Error: Process completed with exit code 1.
Analysis
- #640 auto-generated by
renovate
updated to Cypress 12.10.0 by changingpackage-lock.json
only. There was no change made topackage.json
which uses semantic versioning
cypress-example-kitchensink/package.json
Line 65 in 666a5e7
The workflow is keying the cache on package.json
. This is incorrect, because dependencies are being installed with npm ci
, not npm install
:
cypress-example-kitchensink/.github/workflows/parallel.yml
Lines 45 to 53 in 666a5e7
Immediate Suggestions
- Install Cypress as an exact version. This works better with renovate. It will also cause
package.json
to be updated, thus ensuring a cache renewal by .github/workflows/parallel.yml - Modify .github/workflows/parallel.yml to key the caching of Cypress against
package-lock.json
instead ofpackage.json
.
Further Suggesstions
I suggest also as an enhancement to migrate:
to use https://github.com/cypress-io/github-action.
Users should not have to worry about caching when this issue is already solved by the JavaScript action https://github.com/cypress-io/github-action. The existing parallel.yml and single.yml examples are complex. Users would benefit from being presented with simpler examples that they can build upon.
- PR #646 provides a workaround for this issue