Skip to content

Commit c36b58f

Browse files
Fix cache key in nx-integration-tests using undefined inputs.ref (#379)
The integration-tests job restored the project cache with: key: ${{ runner.os }}-project-${{ inputs.ref }} But `inputs.ref` is not a defined input for this workflow — the declared inputs are `repository`, `pr_head`, and `pr_base`. The expression resolved to an empty string, producing the key `Linux-project-` on every run, which never matched the entry saved by the nx-project-setup job (which used `inputs.pr_head` as the ref throughout). The result was a guaranteed cache miss on any fresh PR run: the `./main` directory was empty when the integration-tests job started, the PHPUnit bootstrap fell back to running `setup:install` against a `tmp-mysql` container that had never been initialised, and the entire suite crashed at bootstrap before a single test executed. Fix: replace `inputs.ref` with `inputs.pr_head`, consistent with every other place in this workflow that references the head SHA.
1 parent 679f125 commit c36b58f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

.github/workflows/nx-integration-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ jobs:
111111
uses: actions/cache/restore@v4
112112
with:
113113
path: main
114-
key: ${{ runner.os }}-project-${{ inputs.ref }}
114+
key: ${{ runner.os }}-project-${{ inputs.pr_head }}
115115

116116
# could probably swap this to a docker container in future
117117
- name: Install NX

0 commit comments

Comments
 (0)