Skip to content

Commit ca6102b

Browse files
ci: Avoid uploading coverage files in Nx cache (TanStack#6644)
* ci: Avoid uploading coverage files in Nx cache * Clean up config
1 parent 422cbed commit ca6102b

File tree

2 files changed

+14
-15
lines changed

2 files changed

+14
-15
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ jobs:
2323
if: github.repository == 'TanStack/query'
2424
runs-on: ubuntu-latest
2525
steps:
26-
- uses: actions/checkout@v4
26+
- name: Checkout
27+
uses: actions/checkout@v4
2728
with:
2829
fetch-depth: '0'
2930
- name: Setup pnpm
@@ -36,7 +37,7 @@ jobs:
3637
node-version-file: .nvmrc
3738
cache: pnpm
3839
- name: Install dependencies
39-
run: pnpm --filter "./packages/**" --filter query --prefer-offline install
40+
run: pnpm install --frozen-lockfile --prefer-offline
4041
- name: Run Tests
4142
run: pnpm run test:ci
4243
- name: Publish
@@ -53,3 +54,5 @@ jobs:
5354
TAG: ${{ inputs.tag }}
5455
- name: Upload coverage to Codecov
5556
uses: codecov/codecov-action@v3
57+
with:
58+
directory: packages

.github/workflows/pr.yml

Lines changed: 9 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ jobs:
2323
name: Nx Cloud - Main Job
2424
runs-on: ubuntu-latest
2525
steps:
26-
- uses: actions/checkout@v4
26+
- name: Checkout
27+
uses: actions/checkout@v4
2728
with:
2829
fetch-depth: 0
2930
- name: Setup pnpm
@@ -35,16 +36,12 @@ jobs:
3536
with:
3637
node-version-file: .nvmrc
3738
cache: pnpm
38-
cache-dependency-path: pnpm-lock.yaml
3939
- name: Install dependencies
40-
run: pnpm --filter "./packages/**" --filter query --prefer-offline install
41-
- name: Get appropriate base and head commits for `nx affected` commands
40+
run: pnpm install --frozen-lockfile --prefer-offline
41+
- name: Get base and head commits for `nx affected`
4242
uses: nrwl/nx-set-shas@v3
4343
with:
4444
main-branch-name: 'main'
45-
- run: |
46-
echo "BASE: ${{ env.NX_BASE }}"
47-
echo "HEAD: ${{ env.NX_HEAD }}"
4845
- name: Start CI Orchestrator
4946
run: npx nx-cloud start-ci-run
5047
- name: Run Tests
@@ -54,6 +51,8 @@ jobs:
5451
run: npx nx-cloud stop-all-agents
5552
- name: Upload coverage to Codecov
5653
uses: codecov/codecov-action@v3
54+
with:
55+
directory: packages
5756
agents:
5857
name: Nx Cloud - Agents
5958
runs-on: ubuntu-latest
@@ -74,9 +73,8 @@ jobs:
7473
with:
7574
node-version-file: .nvmrc
7675
cache: pnpm
77-
cache-dependency-path: pnpm-lock.yaml
7876
- name: Install dependencies
79-
run: pnpm --filter "./packages/**" --filter query --prefer-offline install
77+
run: pnpm install --frozen-lockfile --prefer-offline
8078
- name: Start Nx Agent ${{ matrix.agent }}
8179
run: npx nx-cloud start-agent
8280
format:
@@ -95,9 +93,8 @@ jobs:
9593
with:
9694
node-version-file: .nvmrc
9795
cache: pnpm
98-
cache-dependency-path: pnpm-lock.yaml
9996
- name: Install dependencies
100-
run: pnpm --filter "./packages/**" --filter query --prefer-offline install
97+
run: pnpm install --frozen-lockfile --prefer-offline
10198
- name: Run prettier
10299
run: pnpm run test:format
103100
knip:
@@ -116,8 +113,7 @@ jobs:
116113
with:
117114
node-version-file: .nvmrc
118115
cache: pnpm
119-
cache-dependency-path: pnpm-lock.yaml
120116
- name: Install dependencies
121-
run: pnpm --filter "./packages/**" --filter query --prefer-offline install
117+
run: pnpm install --frozen-lockfile --prefer-offline
122118
- name: Run Knip
123119
run: pnpm knip

0 commit comments

Comments
 (0)