stubs for the compiled module, and a gate that keeps them true (#4) #8
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 | |
| 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 |