-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (68 loc) · 2.24 KB
/
Copy pathci.yml
File metadata and controls
79 lines (68 loc) · 2.24 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
name: CI
on:
push:
branches: [main]
pull_request:
schedule:
# A weekly broader property-test sweep. Pull requests run fixed seeds so
# they are reproducible; this run varies them to find what fixed seeds miss.
- cron: "17 4 * * 1"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: test (${{ matrix.os }}, node ${{ matrix.node }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node: ["22", "24"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: npm
- run: npm ci
- name: Typecheck
run: npm run typecheck
- name: Unit and example tests
run: npm test
# A docs script that fails is worse than no docs script, and this one
# already caught a public type that was reachable but not exported.
- name: Generate API documentation
if: matrix.os == 'ubuntu-latest' && matrix.node == '24'
run: npm run docs
# The real gate: does the thing we would publish work for someone who
# installs it? Runs on every platform, because packaging bugs are
# frequently platform-specific.
- name: Verify packaged install and README example
run: npm run verify:packaged
property-sweep:
name: property sweep (varied seeds)
if: github.event_name == 'schedule'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "24"
cache: npm
- run: npm ci
- name: Planner properties with many runs
env:
# fast-check reads this to widen the search beyond the PR default.
EVENTLAB_PROPERTY_RUNS: "2000"
run: npx vitest run packages/core/test/createPlan.test.ts
- name: Retain counterexamples
if: failure()
uses: actions/upload-artifact@v4
with:
name: property-failures
path: |
**/*.log
packages/core/test/**/__counterexamples__/**
if-no-files-found: ignore
retention-days: 30