-
Notifications
You must be signed in to change notification settings - Fork 0
111 lines (94 loc) · 2.86 KB
/
test.yml
File metadata and controls
111 lines (94 loc) · 2.86 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# CI for typescript-sdk (ARCP)
#
# Action pinning policy:
# - First-party actions (actions/*) use major version tags (e.g. @v4).
# - Third-party actions are pinned to a full commit SHA with a version comment.
#
# package.json engines.node: ">=22"
# Matrix covers floor (22), active LTS (22), and latest (24).
name: test
on:
push:
branches: [main]
paths-ignore:
- "**.md"
- "docs/**"
- "LICENSE"
- ".gitignore"
- ".editorconfig"
pull_request:
branches: [main]
paths-ignore:
- "**.md"
- "docs/**"
- "LICENSE"
- ".gitignore"
- ".editorconfig"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
jobs:
test:
name: test (node ${{ matrix.node }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
node: ["22", "24"]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Setup pnpm
# pnpm/action-setup v4.0.0
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.0.0
with:
version: 9.15.0
run_install: false
- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint (biome)
run: pnpm run lint:biome
# The strict ESLint complexity rules from TYPESCRIPT_SDK_GUIDE.md
# Section 11 are enforced but currently surface ~79 violations across
# 12 files. Sub-phase 2.5 of the refactor (.refactor/STATE.md) is
# closing them. Marked continue-on-error until that sub-phase wraps.
- name: Lint (eslint, advisory during refactor)
run: pnpm run lint:eslint
continue-on-error: true
- name: Typecheck
run: pnpm run typecheck
- name: Build
run: pnpm run build
- name: Test
run: pnpm test
# check:cycles runs madge against the compiled .js so it reports only
# real runtime cycles. Type-only imports (erased by
# verbatimModuleSyntax) can form source-level cycles that don't exist
# at runtime; those are not bugs.
- name: Cycle check
run: pnpm run check:cycles
- name: Are the types wrong?
run: pnpm run check:attw
- name: publint
run: pnpm run check:publint
- name: Upload test artifacts on failure
if: failure()
uses: actions/upload-artifact@v4
with:
name: test-artifacts-node-${{ matrix.node }}
path: |
coverage/
test-results/
*.log
if-no-files-found: ignore
retention-days: 7