-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (65 loc) · 2.7 KB
/
Copy pathvalidate.yml
File metadata and controls
80 lines (65 loc) · 2.7 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
name: validate
on:
push:
branches: [master, main]
pull_request:
permissions:
contents: read
jobs:
validate:
name: validate + pack + typecheck
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "22"
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.0
# npm runs prepare scripts respecting topological dep order; bun
# parallelises and races on nested github: peer-deps (kicad-import
# needs kicad-parsers/dist before its own tsc build can resolve).
- name: Install dependencies
run: npm install --no-package-lock --no-save
- name: Typecheck tools/
run: bun run typecheck
# Verbose STEP→GLB tracing: a WASM abort takes the process down without a
# catchable error, so the last traced model is the only clue to which one
# failed.
- name: Run tests
env:
OPCLIB_PACK_VERBOSE: "1"
run: bun test
- name: Validate library source (strict / release)
run: bun tools/validate.ts --release --strict
# Documented as a hard release gate but never actually run in CI, so a
# bad 3D orientation could land unnoticed. --release exits non-zero on
# any error finding.
- name: 3D orientation gate
run: bun tools/audit-3d-placement.ts --release
# Symbol text-overlap, 3D orientation across every footprint variant, and
# cross-reference checks. --no-render skips the Playwright contact sheet
# (that stays a local command) so CI needs no browser.
- name: Component audit (headless)
run: bun tools/audit-components.ts --no-render
# Structural only — no network. Manufacturer WAFs (st.com, analog.com,
# onsemi, microchip, tdk) block datacenter egress, so reachability would
# fail the build for correct URLs. Run `--network` locally for link rot.
- name: Check datasheet links (structural)
run: bun tools/check-datasheet-links.ts
- name: Pack release candidate
# Tags `ci-<run_id>` so artifact filenames don't collide with real releases.
run: bun tools/pack.ts --version=0.0.0-ci.${{ github.run_id }}
# Verifies the GLB-only core pack and the STEP companion stay buildable.
- name: Pack GLB-only variant
run: bun tools/pack.ts --version=0.0.0-ci.${{ github.run_id }} --no-step --out=dist/glb-only
- name: Upload .opclib artifact
uses: actions/upload-artifact@v4
with:
name: opclib-${{ github.run_id }}
path: dist/*.opclib
retention-days: 14
if-no-files-found: error