Skip to content

feat: add GitHub Actions CI pipeline#21

Closed
tunahorse wants to merge 1 commit intomasterfrom
feat/ci-pipeline
Closed

feat: add GitHub Actions CI pipeline#21
tunahorse wants to merge 1 commit intomasterfrom
feat/ci-pipeline

Conversation

@tunahorse
Copy link
Contributor

@tunahorse tunahorse commented Feb 8, 2026

Summary

  • Adds .github/workflows/ci.yml with three parallel CI jobs
  • lint: ruff check, ruff format --check, mypy
  • test: pytest across Python 3.10 / 3.11 / 3.12 (builds Rust extension via maturin)
  • rust: cargo check, clippy (-D warnings), rustfmt --check
  • Concurrency group cancels stale runs on the same ref
  • Rust builds cached via Swatinem/rust-cache

Test plan

  • Verify CI triggers on this PR
  • Confirm all three jobs pass (lint, test, rust)
  • Verify concurrency cancellation works on re-push

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Established an automated continuous integration pipeline that validates code quality and runs tests across multiple Python versions for each code submission and pull request.

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 <noreply@anthropic.com>
@coderabbitai
Copy link

coderabbitai bot commented Feb 8, 2026

📝 Walkthrough

Walkthrough

A new GitHub Actions CI workflow is introduced at .github/workflows/ci.yml, defining a multi-job pipeline that runs linting, Python testing across multiple versions, and Rust tooling checks on pushes to master and pull requests.

Changes

Cohort / File(s) Summary
CI Workflow Configuration
.github/workflows/ci.yml
New workflow defining three jobs: lint (Ruff and mypy), test (Python versions with Rust toolchains and caching), and rust (clippy and fmt). Includes concurrency controls, environment defaults (Python 3.12, colored Rust output), and triggers on master push/PRs.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A pipeline so fine, with jobs in a line,
Lint, test, and rust checks all align,
On every commit, the workflows take flight,
Catching the bugs and keeping it tight! 🚀

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change—adding a GitHub Actions CI pipeline—which directly matches the changeset introducing the new .github/workflows/ci.yml workflow file.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/ci-pipeline

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.github/workflows/ci.yml:
- Around line 22-29: The lint job fails because the "Install dev dependencies"
step runs pip install -e ".[dev]" --no-build-isolation which requires the Rust
toolchain; update the workflow to set up Rust before that step by adding a rust
toolchain setup (e.g., actions-rs/toolchain or rust-lang/setup) and the Rust
cargo cache similar to the test job's toolchain/cache lines, ensuring the rust
toolchain setup and cache steps run prior to the "Install dev dependencies" step
so cargo/rustc are available for building the maturin-based extension.

Comment on lines +22 to +29
- 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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Lint job will fail: missing Rust toolchain for the editable install.

Since this is a maturin-based project, pip install -e ".[dev]" --no-build-isolation invokes cargo to build the Rust extension. The lint job never sets up a Rust toolchain, so the install step will error out with a missing cargo/rustc. The test job handles this correctly (Lines 54-56).

🐛 Proposed fix — add Rust toolchain and cache before the install
       - uses: actions/setup-python@v5
         with:
           python-version: ${{ env.PYTHON_VERSION }}
 
+      - uses: dtolnay/rust-toolchain@stable
+
+      - uses: Swatinem/rust-cache@v2
+
       - name: Install dev dependencies
         run: pip install -e ".[dev]" --no-build-isolation
🤖 Prompt for AI Agents
In @.github/workflows/ci.yml around lines 22 - 29, The lint job fails because
the "Install dev dependencies" step runs pip install -e ".[dev]"
--no-build-isolation which requires the Rust toolchain; update the workflow to
set up Rust before that step by adding a rust toolchain setup (e.g.,
actions-rs/toolchain or rust-lang/setup) and the Rust cargo cache similar to the
test job's toolchain/cache lines, ensuring the rust toolchain setup and cache
steps run prior to the "Install dev dependencies" step so cargo/rustc are
available for building the maturin-based extension.

@larock22 larock22 closed this Feb 9, 2026
@larock22 larock22 deleted the feat/ci-pipeline branch February 9, 2026 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants