Repository navigation
fix: use --package klaw-dbase to avoid workspace deps #7
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: | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| test: | |
| name: Test (${{ matrix.os }}, Python ${{ matrix.python-version }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, blacksmith-4vcpu-windows-2025] | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| defaults: | |
| run: | |
| working-directory: workspaces/rust/klaw-dbase | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| run: uv python install ${{ matrix.python-version }} | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Rust dependencies | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: workspaces/rust/klaw-dbase | |
| - name: Build and install (dev) | |
| run: uv run --package klaw-dbase maturin develop --release | |
| - name: Run Python tests | |
| run: uv run --package klaw-dbase pytest -v | |
| - name: Run Rust tests | |
| run: cargo test --release | |
| lint: | |
| name: Lint & Format | |
| runs-on: blacksmith-4vcpu-ubuntu-2404 | |
| defaults: | |
| run: | |
| working-directory: workspaces/rust/klaw-dbase | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install Rust toolchain | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| components: rustfmt, clippy | |
| - name: Check formatting | |
| run: cargo fmt --check | |
| - name: Run clippy | |
| run: cargo clippy --all-targets -- -D warnings | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| - name: Run ruff | |
| run: uv run --package klaw-dbase ruff check klaw_dbase/ |