Skip to content

Commit aa4540a

Browse files
authored
chore: fix test caching (#1101)
This PR make targets cacheable again.
1 parent b85316d commit aa4540a

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
- name: Install dependencies
5050
run: npm ci
5151
- name: Lint affected projects
52-
run: npx nx affected:lint --parallel=3
52+
run: npx nx affected -t lint --parallel=3
5353

5454
unit-test:
5555
strategy:
@@ -73,7 +73,7 @@ jobs:
7373
- name: Install dependencies
7474
run: npm ci
7575
- name: Unit test affected projects
76-
run: npx nx affected -t unit-test --parallel=3 --coverage.enabled
76+
run: npx nx affected -t unit-test --parallel=3
7777

7878
integration-test:
7979
strategy:
@@ -97,7 +97,7 @@ jobs:
9797
- name: Install dependencies
9898
run: npm ci
9999
- name: Integration test affected projects
100-
run: npx nx affected -t int-test --parallel=3 --coverage.enabled
100+
run: npx nx affected -t int-test --parallel=3
101101

102102
e2e:
103103
strategy:

.github/workflows/code-coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
- name: Install dependencies
4949
run: npm ci
5050
- name: Execute tests with coverage
51-
run: npx nx run ${{ matrix.project }}:${{ matrix.target }} --coverage.enabled
51+
run: npx nx run ${{ matrix.project }}:${{ matrix.target }}
5252
- name: Upload coverage reports to Codecov
5353
uses: codecov/codecov-action@v4
5454
with:

nx.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
}
7070
},
7171
"unit-test": {
72+
"cache": true,
7273
"outputs": [
7374
"{workspaceRoot}/coverage/{projectName}/unit-tests/lcov.info"
7475
],
@@ -81,6 +82,7 @@
8182
}
8283
},
8384
"int-test": {
85+
"cache": true,
8486
"outputs": ["{workspaceRoot}/coverage/{projectName}/int-tests/lcov.info"],
8587
"executor": "@nx/vite:test",
8688
"options": {

0 commit comments

Comments
 (0)