Repository navigation
168 lines (163 loc) · 6.93 KB
/
Copy pathci.yml
File metadata and controls
168 lines (163 loc) · 6.93 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
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
name: CI
on:
push:
branches: [main, develop]
pull_request:
jobs:
root-checks:
name: Root checks (Biome + Prettier)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
cache: pnpm
- run: pnpm install --frozen-lockfile
- run: pnpm ci:check
nda-guards:
name: NDA guards / ${{ matrix.os }} / Node ${{ matrix.node }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node: [22, 24]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
# set-hooks-path.test.mjs runs pnpm install, to prove what the person sees. The install and tsc steps below need pnpm too.
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- run: node --test .githooks/nda-match.test.mjs .githooks/nda-push.test.mjs .githooks/set-hooks-path.test.mjs
# The install puts tsc, @types/node and @unic/tsconfig on disk for the tsc steps. The tests need none of them.
# The tsc steps need no lifecycle scripts, so the install skips those scripts, as ADR-0014 asks on Windows.
- run: pnpm install --frozen-lockfile --ignore-scripts
- run: pnpm exec tsc --noEmit --project .githooks/tsconfig.json
- run: pnpm exec tsc --noEmit --project .claude/hooks/tsconfig.json
changes:
name: Detect changed packages
runs-on: ubuntu-latest
outputs:
pr-review: ${{ steps.filter.outputs.pr-review }}
unic-pr-review: ${{ steps.filter.outputs.unic-pr-review }}
unic-spec-review: ${{ steps.filter.outputs.unic-spec-review }}
unic-learning-loop: ${{ steps.filter.outputs.unic-learning-loop }}
terse-orwell: ${{ steps.filter.outputs.terse-orwell }}
auto-format: ${{ steps.filter.outputs.auto-format }}
unic-confluence: ${{ steps.filter.outputs.unic-confluence }}
release-tools: ${{ steps.filter.outputs.release-tools }}
unic-archon-dlc: ${{ steps.filter.outputs.unic-archon-dlc }}
tracker-streams: ${{ steps.filter.outputs.tracker-streams }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
pr-review:
- 'apps/claude-code/pr-review/**'
unic-pr-review:
- 'apps/claude-code/unic-pr-review/**'
unic-spec-review:
- 'apps/claude-code/unic-spec-review/**'
unic-learning-loop:
- 'apps/claude-code/unic-learning-loop/**'
terse-orwell:
- 'apps/claude-code/terse-orwell/**'
auto-format:
- 'apps/claude-code/auto-format/**'
unic-confluence:
- 'apps/claude-code/unic-confluence/**'
release-tools:
- 'packages/release-tools/**'
unic-archon-dlc:
- 'apps/claude-code/unic-archon-dlc/**'
tracker-streams:
- 'packages/tracker-streams/**'
test:
name: Test ${{ matrix.package.name }} / ${{ matrix.os }} / Node ${{ matrix.node }}
needs: changes
if: |
needs.changes.outputs.auto-format == 'true' ||
needs.changes.outputs.unic-confluence == 'true' ||
needs.changes.outputs.release-tools == 'true' ||
needs.changes.outputs.unic-archon-dlc == 'true' ||
needs.changes.outputs.pr-review == 'true' ||
needs.changes.outputs.unic-pr-review == 'true' ||
needs.changes.outputs.unic-spec-review == 'true' ||
needs.changes.outputs.unic-learning-loop == 'true' ||
needs.changes.outputs.terse-orwell == 'true' ||
needs.changes.outputs.tracker-streams == 'true'
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node: ['22', '24']
# `plugin` decides whether verify:changelog applies. Only a versioned plugin under
# apps/claude-code/ carries .claude-plugin/plugin.json and a CHANGELOG the gate can read;
# a workspace package under packages/ is private at 0.0.0 and has neither. Naming the
# exceptions instead would need a new exclusion per package added — which is how
# release-tools and tracker-streams both ended up configured for a step they cannot run.
package:
- name: auto-format
plugin: true
changed: ${{ needs.changes.outputs.auto-format }}
- name: unic-confluence
plugin: true
changed: ${{ needs.changes.outputs.unic-confluence }}
- name: release-tools
plugin: false
changed: ${{ needs.changes.outputs.release-tools }}
- name: unic-archon-dlc
plugin: true
changed: ${{ needs.changes.outputs.unic-archon-dlc }}
- name: pr-review
plugin: true
changed: ${{ needs.changes.outputs.pr-review }}
- name: unic-pr-review
plugin: true
changed: ${{ needs.changes.outputs.unic-pr-review }}
- name: unic-spec-review
plugin: true
changed: ${{ needs.changes.outputs.unic-spec-review }}
- name: unic-learning-loop
plugin: true
changed: ${{ needs.changes.outputs.unic-learning-loop }}
- name: terse-orwell
plugin: true
changed: ${{ needs.changes.outputs.terse-orwell }}
- name: tracker-streams
plugin: false
changed: ${{ needs.changes.outputs.tracker-streams }}
exclude:
- package:
changed: 'false'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # verify:changelog needs full history to diff against base branch
- uses: pnpm/action-setup@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: pnpm
- if: runner.os != 'Windows'
run: pnpm install --frozen-lockfile
- if: runner.os == 'Windows'
run: pnpm install --frozen-lockfile --ignore-scripts
# Install Azure CLI + azure-devops extension only on Linux/Node 24 so the
# pr-review ADO CLI smoke test (tests/ado-cli-smoke.test.mjs) actually
# invokes `--help` against each inventory entry on at least one matrix
# cell. Other cells fall through the t.skip path cleanly.
- if: matrix.package.name == 'pr-review' && matrix.os == 'ubuntu-latest' && matrix.node == '24'
run: |
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
az extension add --name azure-devops
- run: pnpm --filter ${{ matrix.package.name }} --if-present test
- run: pnpm --filter ${{ matrix.package.name }} --if-present typecheck
- if: github.event_name == 'pull_request' && matrix.package.plugin
run: pnpm --filter ${{ matrix.package.name }} verify:changelog