Repository navigation
chore(scripts): name a nipost_pk_test key as a test key #221
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | |
| 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 | |
| env: | |
| PG: "16" | |
| 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: PostgreSQL headers, and leave to install an extension | |
| run: | | |
| sudo apt-get update | |
| 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 |