Skip to content

Commit 71859dc

Browse files
committed
chore: push events now create a new cache
1 parent 8cc9b0e commit 71859dc

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@ jobs:
2727
node-version: 18
2828
- name: Install
2929
run: npm ci --ignore-scripts
30-
# Restore the nx compilation cache for the latest commit to main.
30+
# Note: On PRs restore the nx compilation cache for the latest commit to main.
3131
# The subsequent 'npm run compile' should only need to compile changed packages.
32-
- name: Compile Cache Lookup
32+
- name: Compile Cache Lookup (PR)
33+
if: ${{ github.event_name == 'pull_request' }}
3334
uses: actions/cache/restore@v4
3435
with:
3536
key: compile-cache-main
@@ -43,8 +44,9 @@ jobs:
4344
with:
4445
key: compile-cache-main
4546
path: .nx
46-
# Note: upload cache to be used in this worflow run
47-
# by the unit-test and test-all-versions jobs
47+
# Note: upload cache to be used in this workflow run
48+
# by the unit-test and test-all-versions jobs. Not using
49+
# cache action since this is meant to live only for the current run
4850
- name: Upload Compile Cache (PR)
4951
uses: actions/upload-artifact@v5
5052
with:

0 commit comments

Comments
 (0)