name: "Restore Cypress deps cache" description: > The Actions-cache transport for the Cypress deps — node_modules plus the Cypress binary — keyed on the cypress lockfile. This is the fast path, taken whenever the key is warm: prep-deps asks whether it exists with lookup-only, and the workers do the real restore. Read-only, as e2e-ci-cache-warm-cypress-deps.yml is the only writer of the key, so PR and merge runs never write to the Actions cache. When the key is cold the template falls back to the artifact transport instead — pack-cypress-deps into unpack-cypress-deps — which must land the same payload in the same paths, so the two transports are interchangeable. inputs: lookup-only: description: "Probe whether the key exists without downloading the entry." required: false default: "false" fail-on-cache-miss: description: "Fail the step when the exact key is absent." required: false default: "false" outputs: cache-hit: description: "true on an exact-key hit" value: ${{ steps.restore.outputs.cache-hit }} key: description: "The computed cache key" value: ${{ steps.key.outputs.key }} runs: using: "composite" steps: - name: ci/compute-cypress-deps-key id: key shell: bash run: echo "key=e2e-cypress-deps-${{ runner.os }}-${{ hashFiles('e2e-tests/cypress/package-lock.json') }}" >> "${GITHUB_OUTPUT}" - name: ci/restore-cypress-deps id: restore uses: actions/cache/restore@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3 # No restore-keys: an older node_modules is not a usable substitute for # this lockfile, and a partial hit would silently diverge from `npm ci`. with: path: | e2e-tests/cypress/node_modules ~/.cache/Cypress key: ${{ steps.key.outputs.key }} lookup-only: ${{ inputs.lookup-only }} fail-on-cache-miss: ${{ inputs.fail-on-cache-miss }}