This problem does not occur the first time a workflow is run in a branch. It happens on subsequent runs when caches have been established.
The caching error does not prevent the action from successfully completing Cypress tests.
Logs
/usr/bin/tar -xf /__w/_temp/ca2a82ec-2d14-4f9f-a1e8-869a277f1c39/cache.tgz -P -C /__w/cypress-docker-images/cypress-docker-images -z
/usr/bin/tar: ../../../root/.cache/Cypress/13.11.0/Cypress/resources/app/packages/resolve-dist: Cannot utime: Operation not permitted
/usr/bin/tar: ../../../root/.cache/Cypress/13.11.0/Cypress/resources/app/packages/resolve-dist: Cannot change mode to rwxr-xr-x: Operation not permitted
/usr/bin/tar: ../../../root/.cache/Cypress/13.11.0/Cypress/resources/app/packages/net-stubbing/node_modules/mime-db: Cannot utime: Operation not permitted
/usr/bin/tar: ../../../root/.cache/Cypress/13.11.0/Cypress/resources/app/packages/net-stubbing/node_modules/mime-db: Cannot change mode to rwxr-xr-x: Operation not permitted
/usr/bin/tar: ../../../root/.cache/Cypress/13.11.0/Cypress/resources/app/packages/net-stubbing/node_modules/mime-types: Cannot utime: Operation not permitted
/usr/bin/tar: ../../../root/.cache/Cypress/13.11.0/Cypress/resources/app/packages/net-stubbing/node_modules/mime-types: Cannot change mode to rwxr-xr-x: Operation not permitted
...
...
/usr/bin/tar: ../../../root/.cache/Cypress: Cannot utime: Operation not permitted
/usr/bin/tar: ../../../root/.cache/Cypress: Cannot change mode to rwxr-xr-x: Operation not permitted
/usr/bin/tar: Exiting with failure status due to previous errors
Warning: Failed to restore: "/usr/bin/tar" failed with error: The process '/usr/bin/tar' failed with exit code 2
Workaround
Set the environment variable CYPRESS_INSTALL_BINARY=0 to avoid unnecessary caching of the Cypress binary. For instance:
Issue
If cypress-io/github-action is used to run
cypress/included
with--user 1001
(as recommended), then GitHub actions may report a caching errorThe workflow includes the following:
This problem does not occur the first time a workflow is run in a branch. It happens on subsequent runs when caches have been established.
The caching error does not prevent the action from successfully completing Cypress tests.
Logs
Workaround
Set the environment variable
CYPRESS_INSTALL_BINARY=0
to avoid unnecessary caching of the Cypress binary. For instance:This setting should be added to the documentation.