Open History to see the last commit
1name: Coverage
2
3# Measures coverage for every package on main. The numbers themselves are not
4# asserted here — the point is to populate the Nx Cloud cache, so that when a
5# PR re-measures its merge-base the `test:coverage` task hashes already exist
6# remotely and the summaries are restored instead of recomputed.
7on:
8 push:
9 branches: [main]
10
11concurrency:
12 group: ${{ github.workflow }}-${{ github.ref }}
13 cancel-in-progress: true
14
15env:
16 NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
17
18permissions:
19 contents: read
20
21jobs:
22 coverage:
23 name: Warm Coverage Cache
24 runs-on: ubuntu-latest
25 steps:
26 - name: Checkout
27 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
28 with:
29 persist-credentials: false
30 - name: Setup Tools
31 uses: TanStack/config/.github/setup@190f659075ff0845850e330883eb26d7ffd0671f # main
32 - name: Run Coverage
33 # Keep the args after `--` identical to both runs in pr.yml. Nx puts
34 # forwarded args in the task hash, so any difference is a cache miss.
35 run: pnpm exec nx run-many --targets=test:coverage --exclude='examples/**,testing/**' -- --coverage.reporter=json-summary --coverage.include='src/**'