From e1f9d7100e83beb9bfbd252e4d4fee6bd2c60ebf Mon Sep 17 00:00:00 2001 From: tuna Date: Sun, 8 Feb 2026 12:25:02 -0600 Subject: [PATCH] feat: add GitHub Actions CI pipeline MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Lint (ruff + mypy), test (Python 3.10–3.12 with maturin build), and Rust checks (cargo check, clippy, rustfmt) on push/PR to master. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/ci.yml | 83 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..dd603f7 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,83 @@ +name: CI + +on: + push: + branches: [master] + pull_request: + branches: [master] + +concurrency: + group: ci-${{ github.ref }} + cancel-in-progress: true + +env: + PYTHON_VERSION: "3.12" + CARGO_TERM_COLOR: always + +jobs: + lint: + name: Lint (ruff + mypy) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: ${{ env.PYTHON_VERSION }} + + - name: Install dev dependencies + run: pip install -e ".[dev]" --no-build-isolation + + - name: Ruff check + run: ruff check . + + - name: Ruff format check + run: ruff format --check . + + - name: Mypy + run: mypy . + + test: + name: Test (Python ${{ matrix.python-version }}) + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + python-version: ["3.10", "3.11", "3.12"] + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - uses: dtolnay/rust-toolchain@stable + + - uses: Swatinem/rust-cache@v2 + + - name: Install package with dev deps + run: pip install -e ".[dev]" --no-build-isolation + + - name: Run tests + run: pytest tests/ -v + + rust: + name: Rust (check + clippy + fmt) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: dtolnay/rust-toolchain@stable + with: + components: clippy, rustfmt + + - uses: Swatinem/rust-cache@v2 + + - name: Cargo check + run: cargo check + + - name: Clippy + run: cargo clippy -- -D warnings + + - name: Rustfmt + run: cargo fmt --check