Repository navigation
65 lines (60 loc) · 2.23 KB
/
Copy pathcoverage.yml
File metadata and controls
65 lines (60 loc) · 2.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Coverage
# Measures coverage for every package on main. Each package's vitest config
# sets absolute thresholds, so a package below its floor fails here too; the
# main point is to populate the Nx Cloud cache, so that when a PR re-measures
# its merge-base the `test:coverage` task hashes already exist remotely and the
# summaries are restored instead of recomputed.
on:
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
NX_CLOUD_ACCESS_TOKEN: ${{ secrets.NX_CLOUD_ACCESS_TOKEN }}
permissions:
contents: read
jobs:
coverage:
name: Warm Coverage Cache
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: cms_test
POSTGRES_PASSWORD: cms_test
POSTGRES_DB: cms_test
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U cms_test -d cms_test"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
POSTGRES_TEST_URL: postgres://cms_test:cms_test@localhost:5432/cms_test
steps:
- name: Checkout
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
with:
persist-credentials: false
- name: Setup Tools
uses: TanStack/config/.github/setup@e3cc8e6ec57318842dd54ffba909c99357530f67 # main
- name: Run Coverage
# Keep the args after `--` identical to both runs in pr.yml. Nx puts
# forwarded args in the task hash, so any difference is a cache miss.
run: pnpm exec nx run-many --targets=test:coverage --exclude='examples/**' -- --coverage.reporter=json-summary --coverage.include='src/**'
bench:
name: Store Benchmarks
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
with:
persist-credentials: false
- name: Setup Tools
uses: TanStack/config/.github/setup@e3cc8e6ec57318842dd54ffba909c99357530f67 # main
# 10k and 100k documents; fails when a p95 exceeds its budget in bench/store.ts.
- name: Run benchmarks
run: pnpm --filter @tanstack/cms-core bench --check