Skip to content

Commit 677cb02

Browse files
author
Luca Forstner
authored
ci(e2e): Restore nxcache in e2e tests (#9370)
1 parent 25542d3 commit 677cb02

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

.github/workflows/build.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -817,13 +817,20 @@ jobs:
817817
uses: ./.github/actions/restore-cache
818818
env:
819819
DEPENDENCY_CACHE_KEY: ${{ needs.job_build.outputs.dependency_cache_key }}
820-
- name: Check tarball cache
821-
uses: actions/cache@v3
820+
- name: NX cache
821+
uses: actions/cache/restore@v3
822822
with:
823-
path: ${{ github.workspace }}/packages/*/*.tgz
824-
key: ${{ env.BUILD_CACHE_TARBALL_KEY }}
823+
path: .nxcache
824+
key: nx-Linux-${{ github.ref }}-${{ env.HEAD_COMMIT }}
825+
# On develop branch, we want to _store_ the cache (so it can be used by other branches), but never _restore_ from it
826+
restore-keys: ${{ env.NX_CACHE_RESTORE_KEYS }}
825827
- name: Build tarballs
826828
run: yarn build:tarball
829+
- name: Stores tarballs in cache
830+
uses: actions/cache/save@v3
831+
with:
832+
path: ${{ github.workspace }}/packages/*/*.tgz
833+
key: ${{ env.BUILD_CACHE_TARBALL_KEY }}
827834

828835
job_e2e_tests:
829836
name: E2E ${{ matrix.label || matrix.test-application }} Test

0 commit comments

Comments
 (0)