-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (72 loc) · 2.75 KB
/
Copy pathci.yml
File metadata and controls
91 lines (72 loc) · 2.75 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
80
81
82
83
84
85
86
87
88
89
90
91
name: CI
on:
push:
branches: [main]
pull_request:
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- name: Install
run: pnpm install --frozen-lockfile
# Build first: sibling packages depend on `acture` via `workspace:*`
# and consume its types from `dist/`. Typecheck would fail if dist
# is missing, so build must precede typecheck and test.
- name: Build
run: pnpm -r --filter "./packages/*" build
- name: Typecheck
run: pnpm -r --filter "./packages/*" typecheck
- name: Test
run: pnpm -r --filter "./packages/*" test
- name: Pack
run: pnpm --filter acture pack --pack-destination /tmp
- name: Inspect tarball
run: |
ls -la /tmp/acture-*.tgz
tar -tzf /tmp/acture-*.tgz
# The published `acture-forms-rjsf` peer range is `^5.20.0 || ^6.0.0`. The job
# above installs and tests the 6.x half; this one installs and tests the 5.x
# half, so both ends of the promise are checked on every PR.
#
# It is a second INSTALL, not a second alias tree in one install — which is the
# only thing pnpm's peers-are-matched-by-name behaviour actually rules out.
# `scripts/pin-rjsf-5x.mjs` rewrites the three `@rjsf` devDependencies to the
# 5.x clause READ OFF the declared peer range, drops the 6.x-only
# `@rjsf/shadcn` and its smoke test, and no-ops if the range ever narrows to
# 6-only. Without this job a value that is legal on 6.x but not on 5.x — e.g.
# `liveValidate="onChange"`, widened in 6.x — ships green.
rjsf5:
name: forms-rjsf against @rjsf 5.x
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10
- uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
- name: Pin the forms-rjsf dev tree to the 5.x half of its peer range
run: node scripts/pin-rjsf-5x.mjs
# The lockfile describes the 6.x tree, so this install deliberately
# resolves fresh. Nothing is committed from this job.
- name: Install
run: pnpm install --no-frozen-lockfile
- name: Assert a real 5.x tree resolved
run: node scripts/pin-rjsf-5x.mjs --verify
# forms-rjsf consumes `acture` types out of its dist/.
- name: Build acture
run: pnpm --filter acture build
- name: Typecheck forms-rjsf against 5.x
run: pnpm --filter acture-forms-rjsf typecheck
- name: Test forms-rjsf against 5.x
run: pnpm --filter acture-forms-rjsf test