the corpus, read and run in Python #20
Workflow file for this run
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: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - run: pip install ruff==0.16.3 | |
| - run: ruff check . | |
| - run: ruff format --check . | |
| # rust-toolchain.toml is what picks the compiler, here and on | |
| # every machine, so nothing installs one. | |
| - run: cargo fmt --all --check | |
| - run: cargo clippy --all-targets -- -D warnings | |
| # The other two ABIs the release builds, each a feature of this | |
| # crate, compiled here so that a change which breaks one is found | |
| # on the pull request rather than on the tag. The free-threaded | |
| # stable ABI needs no interpreter at all, which is the point of a | |
| # stable ABI and the only reason 3.15 can be built for before it | |
| # is installable. | |
| - run: cargo check --no-default-features --features pyo3/extension-module | |
| - run: cargo check --no-default-features --features abi3t,pyo3/extension-module | |
| env: | |
| PYO3_NO_PYTHON: 1 | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python: ["3.11", "3.14"] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| - uses: Swatinem/rust-cache@v2 | |
| # Installed as a wheel rather than developed in place, so what | |
| # the suite imports is what a person who runs `pip install zudb` | |
| # gets: the extension out of a wheel, the package out of | |
| # site-packages, and nothing resolved out of the checkout. | |
| - run: pip install ".[all]" | |
| # griffe reads the stub and inspects the installed extension, so | |
| # the check runs against the wheel rather than against the | |
| # checkout it was built from. | |
| - run: pip install pytest griffe | |
| - run: pytest | |
| # The shared corpus, which is the same 945 cases the engine runs | |
| # against itself and the eight other clients run against theirs. It is | |
| # a job of its own because it needs a second checkout, and it runs on | |
| # one platform because what it is asking about is this client's value | |
| # mapping rather than anything the operating system decides. | |
| corpus: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - uses: Swatinem/rust-cache@v2 | |
| # The cases are versioned with the engine, so the revision comes | |
| # out of the pin this client already builds against rather than | |
| # being written down a second time and drifting. | |
| - id: pin | |
| run: | | |
| rev=$(sed -n 's/^zudb = .*rev = "\([0-9a-f]*\)".*/\1/p' Cargo.toml) | |
| test -n "$rev" | |
| echo "rev=$rev" >> "$GITHUB_OUTPUT" | |
| - uses: actions/checkout@v7 | |
| with: | |
| repository: tamnd/zu | |
| ref: ${{ steps.pin.outputs.rev }} | |
| path: engine | |
| - run: pip install . pytest | |
| # The runner first, because its summary is the line a person | |
| # reads, and the suite second, because it is the one that knows | |
| # which cases this client is allowed to leave unanswered. | |
| - run: python -m conformance engine/conformance/cases | |
| - run: pytest tests/test_conformance.py | |
| env: | |
| ZU_CASES: engine/conformance/cases |