-
Notifications
You must be signed in to change notification settings - Fork 9
233 lines (223 loc) · 7.73 KB
/
Copy pathci.yml
File metadata and controls
233 lines (223 loc) · 7.73 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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
types: [opened, synchronize, reopened]
merge_group:
types: [checks_requested]
workflow_dispatch:
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
# A newer PR commit supersedes stale evidence; the required aggregate must
# still fail closed if cancellation reaches its dependencies.
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
jobs:
static:
name: static
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: ./.github/actions/setup-python-tests
with:
python-version: "3.12"
- uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
with:
node-version: "24"
package-manager-cache: false
- run: make lint-full
- run: make typecheck
- run: make architecture
- run: make todo-check
- run: make import-contracts
- run: make docs-linkcheck
- run: make npm-test
- run: make build
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: dist
path: dist/
python:
name: python (${{ matrix.lane }})
runs-on: ubuntu-latest
timeout-minutes: ${{ matrix.timeout-minutes }}
strategy:
fail-fast: false
matrix:
include:
- lane: unit
timeout-minutes: 10
- lane: component
timeout-minutes: 15
- lane: domain
timeout-minutes: 15
- lane: composition
timeout-minutes: 25
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: ./.github/actions/setup-python-tests
with:
python-version: "3.12"
- uses: ./.github/actions/run-test-lane
with:
lane: ${{ matrix.lane }}
junit-artifact: junit-python-${{ matrix.lane }}-3.12
coverage-artifact: coverage-data-python-${{ matrix.lane }}
coverage-file: .coverage.python-${{ matrix.lane }}
boundaries:
name: boundaries (${{ matrix.lane }})
runs-on: ubuntu-latest
timeout-minutes: 25
strategy:
fail-fast: false
matrix:
lane: [process, mcp]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: ./.github/actions/setup-python-tests
with:
python-version: "3.12"
- uses: ./.github/actions/run-test-lane
with:
lane: ${{ matrix.lane }}
junit-artifact: junit-${{ matrix.lane }}-3.12
coverage-artifact: coverage-data-${{ matrix.lane }}
coverage-file: .coverage.${{ matrix.lane }}
wheel:
name: wheel (Python ${{ matrix.python-version }})
needs: [static]
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
python-version: ["3.12", "3.13"]
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
with:
python-version: ${{ matrix.python-version }}
- uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
with:
version: "0.11.28"
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: dist
path: dist
- name: Install and start the built wheel
run: |
wheel="$(find dist -maxdepth 1 -name '*.whl' -print -quit)"
test -n "$wheel"
environment="$RUNNER_TEMP/jacobian-wheel-${{ matrix.python-version }}"
uv venv --python "${{ matrix.python-version }}" "$environment"
uv pip install --python "$environment/bin/python" \
--only-binary :all: "$wheel"
"$environment/bin/jacobian" --help
"$environment/bin/jacobian-mcp" --help
"$environment/bin/jacobian" run integer.compute.gcd \
--json '{"left":"84","right":"30"}'
- if: matrix.python-version == '3.13'
uses: ./.github/actions/setup-python-tests
with:
python-version: "3.13"
- if: matrix.python-version == '3.13'
run: make test-compatibility
env:
PYTEST_ARGS: --junitxml=pytest.xml
lean:
name: Lean Runtime
# Full Lean is the merge-group/main gate. Pull requests skip it so
# intermediate commits are not blocked for the ~14 minute specialist suite.
# Enable GitHub merge queue on main; otherwise Lean only runs after a
# push to main.
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Prepare Lean test environment
uses: ./.github/actions/setup-lean
- run: make test-lean
coverage:
name: Coverage
if: ${{ always() }}
needs: [python, boundaries]
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Require python and boundary lanes
env:
PYTHON_RESULT: ${{ needs.python.result }}
BOUNDARIES_RESULT: ${{ needs.boundaries.result }}
run: |
test "$PYTHON_RESULT" = success
test "$BOUNDARIES_RESULT" = success
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: ./.github/actions/setup-python-tests
with:
python-version: "3.12"
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
pattern: coverage-data-*
path: coverage-data
merge-multiple: true
- run: uv run --locked coverage combine coverage-data
- run: uv run --locked coverage report --fail-under=50 | tee coverage-report.txt
shell: bash -o pipefail {0}
- run: uv run --locked coverage xml
- name: Publish coverage summary
run: |
{
echo "## Coverage Report"
echo ""
echo '```'
cat coverage-report.txt
echo '```'
} >> "$GITHUB_STEP_SUMMARY"
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: coverage-3.12
path: coverage.xml
required:
name: required
if: ${{ always() }}
needs: [static, python, boundaries, wheel, coverage, lean]
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Require static python boundaries wheel coverage and selected specialist lanes
env:
EVENT_NAME: ${{ github.event_name }}
STATIC_RESULT: ${{ needs.static.result }}
PYTHON_RESULT: ${{ needs.python.result }}
BOUNDARIES_RESULT: ${{ needs.boundaries.result }}
WHEEL_RESULT: ${{ needs.wheel.result }}
COVERAGE_RESULT: ${{ needs.coverage.result }}
LEAN_RESULT: ${{ needs.lean.result }}
run: |
test "$STATIC_RESULT" = success
test "$PYTHON_RESULT" = success
test "$BOUNDARIES_RESULT" = success
test "$WHEEL_RESULT" = success
test "$COVERAGE_RESULT" = success
if [ "$EVENT_NAME" = pull_request ]; then
test "$LEAN_RESULT" = skipped || test "$LEAN_RESULT" = success
else
test "$LEAN_RESULT" = success
fi