Skip to content

Commit ded47b8

Browse files
committed
ci: Fix cash for nx
1 parent d815a07 commit ded47b8

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,13 @@ jobs:
1616
fetch-depth: 0
1717
- name: Npm install
1818
uses: ./.github/actions
19-
# This line is needed for nx affected to work when CI is running on a PR
19+
- name: Restore cached .nx
20+
id: cache-nx-restore
21+
uses: actions/cache/restore@v4
22+
with:
23+
path: |
24+
.nx
25+
key: ${{ runner.os }}-nx-${GITHUB_REF}
2026
- run: git branch --track main origin/master
2127
- name: Test and build
2228
run: npx nx affected -t test build --parallel=3 --exclude='json-api-front,json-api-server,json-api-server-e2e,json-shared-type,database,@nestjs-json-api/source'
@@ -26,8 +32,7 @@ jobs:
2632
with:
2733
path: |
2834
.nx
29-
.angular
30-
key: ${{ runner.os }}-npm-dependencies-${{ hashFiles('package-lock.json') }}
35+
key: ${{ steps.cache-nx-restore.outputs.cache-primary-key }}
3136
run-e2e-test:
3237
runs-on: ubuntu-latest
3338
name: Try run e2e test

0 commit comments

Comments
 (0)