Repository navigation
238 lines (226 loc) · 9.17 KB
/
Copy pathci.yml
File metadata and controls
238 lines (226 loc) · 9.17 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
234
235
236
237
238
name: CI
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
rust:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: dtolnay/rust-toolchain@89b12181fb390509a0842a86cc55eeb8eb928c1d # stable
with:
toolchain: stable
components: clippy, rustfmt
- run: cargo fmt --check
- run: cargo clippy --locked --all-features --all-targets -- -D warnings
- run: cargo test --locked --all-features
- run: cargo test --locked --no-default-features
- name: Builds on the minimum Rust version Cargo.toml declares
run: |
msrv=$(sed -n 's/^rust-version = "\(.*\)"/\1/p' Cargo.toml)
rustup toolchain install "$msrv" --profile minimal
cargo "+$msrv" check --locked --all-features
- uses: taiki-e/install-action@f7e5d7c961414b23f5b25b2da9294395d08513ad # v2.87.26
with:
tool: cargo-audit,cargo-semver-checks
- run: cargo audit
- name: A breaking change comes with a version that says so
run: cargo semver-checks --all-features
- name: The agent docs match the READMEs
run: python3 scripts/llms_full.py --check
- name: Every client tests the obligations in spec/client.json
run: python3 scripts/client_obligations.py
python:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.10", "3.11", "3.12", "3.13", "3.14"]
defaults:
run:
working-directory: python
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
with:
python-version: ${{ matrix.python }}
- run: uv run --group dev ruff format --check .
- run: uv run --group dev ruff check .
- run: uv run --group dev mypy
- run: uv run --group dev pytest
- name: The PostgreSQL file agrees with spec/vectors.json
if: matrix.python == '3.14'
working-directory: .
run: |
sudo systemctl start postgresql.service
sudo -u postgres createuser --superuser "$USER"
PGDATABASE=postgres python3 scripts/sql_conformance.py postgres
- name: The DuckDB file agrees with spec/vectors.json
if: matrix.python == '3.14'
working-directory: .
run: uv run --no-project --with duckdb==1.5.5 python scripts/sql_conformance.py duckdb
mcp:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.10", "3.14"]
defaults:
run:
working-directory: mcp
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
with:
python-version: ${{ matrix.python }}
- run: uv run --group dev ruff format --check .
- run: uv run --group dev ruff check .
- run: uv run --group dev mypy
- run: uv run --group dev pytest
node:
runs-on: ubuntu-latest
strategy:
matrix:
node: ["22", "24"]
defaults:
run:
working-directory: js
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: ${{ matrix.node }}
cache: npm
cache-dependency-path: js/package-lock.json
- run: npm ci
- run: npm run build
- run: npm run check
- run: npm test
template:
runs-on: ubuntu-latest
strategy:
matrix:
node: ["22", "24"]
defaults:
run:
working-directory: templates/nigerian-address-form
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0
with:
node-version: ${{ matrix.node }}
cache: npm
cache-dependency-path: templates/nigerian-address-form/package-lock.json
- run: npm ci
- run: npm run typecheck
- run: npm test
- run: npm run build
- name: The published registry item matches the source
run: npm run registry && test -z "$(git status --porcelain ../../docs/r)"
java:
runs-on: ubuntu-latest
strategy:
matrix:
java: ["17", "21", "25"]
defaults:
run:
working-directory: java
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
with:
distribution: temurin
java-version: ${{ matrix.java }}
cache: maven
- run: ./mvnw -B verify
- name: The release bundle holds only what Maven Central accepts
if: matrix.java == '17'
run: |
# Staged and bundled as a release is, unsigned, with the upload aimed at nothing.
server='<server><id>central</id><username>none</username><password>none</password></server>'
echo "<settings><servers>$server</servers></settings>" > "$RUNNER_TEMP/settings.xml"
./mvnw -B -q -s "$RUNNER_TEMP/settings.xml" -Prelease -DskipTests -Dgpg.skip=true \
-DcentralBaseUrl=http://127.0.0.1:9 deploy > /dev/null 2>&1 || true
test -f target/central-publishing/central-bundle.zip
version=$(./mvnw -q help:evaluate -Dexpression=project.version -DforceStdout)
! unzip -Z1 target/central-publishing/central-bundle.zip | grep -v "/$version/"
docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- run: docker build -t ng-postcode-mcp .
- name: Answers an initialize request over stdio
run: |
request='{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"ci","version":"0"}}}'
echo "$request" | docker run --rm -i ng-postcode-mcp | grep -q '"ng-postcode"'
agent:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.10", "3.14"]
defaults:
run:
working-directory: agent
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
with:
python-version: ${{ matrix.python }}
- run: uv run --group dev ruff format --check .
- run: uv run --group dev ruff check .
- run: uv run --group dev mypy
- run: uv run --group dev pytest
# Code compiled from the Rust core for other systems. These builds are slow, so they
# have a job of their own, and it is not one of the checks a merge waits for.
native:
runs-on: ubuntu-latest
defaults:
run:
working-directory: native/polars
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: dtolnay/rust-toolchain@89b12181fb390509a0842a86cc55eeb8eb928c1d # stable
with:
toolchain: stable
components: clippy, rustfmt
- uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0
- run: cargo fmt --check
- run: cargo clippy --locked -- -D warnings
- run: uv run --group dev ruff format --check .
- run: uv run --group dev ruff check .
- run: uv run --group dev mypy
- run: uv run --group dev pytest
# The PostgreSQL extension, tested against the runner's own PostgreSQL. Like `native`, it
# is slow and is not one of the checks a merge waits for.
native-pg:
runs-on: ubuntu-latest
defaults:
run:
working-directory: native/pg
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- uses: dtolnay/rust-toolchain@89b12181fb390509a0842a86cc55eeb8eb928c1d # stable
with:
toolchain: stable
components: clippy, rustfmt
- name: Headers for the runner's own PostgreSQL, and leave to install an extension
run: |
PG=$(ls /usr/lib/postgresql | sort -n | tail -1)
echo "PG=$PG" >> "$GITHUB_ENV"
# The runner's PostgreSQL comes from PGDG, so its headers must too.
sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y
sudo apt-get install -y "postgresql-server-dev-$PG" libclang-dev
sudo chmod -R a+rwX "$(pg_config --pkglibdir)" "$(pg_config --sharedir)/extension"
- run: cargo install cargo-pgrx --version 0.19.3 --locked
- run: cargo pgrx init "--pg$PG" "$(which pg_config)"
- run: cargo fmt --check
- run: cargo clippy --locked --no-default-features --features "pg$PG" -- -D warnings
- run: cargo pgrx test "pg$PG" --no-default-features
- name: The extension agrees with spec/vectors.json
working-directory: .
run: |
(cd native/pg && cargo pgrx install --release --no-default-features --features "pg$PG" --pg-config "$(which pg_config)")
sudo systemctl start postgresql.service
sudo -u postgres createuser --superuser "$USER"
PGDATABASE=postgres python3 scripts/sql_conformance.py extension