Skip to content

ci: add PR test + lint workflow#7

Merged
achris7 merged 1 commit into
mainfrom
ci/add-ci
Jun 16, 2026
Merged

ci: add PR test + lint workflow#7
achris7 merged 1 commit into
mainfrom
ci/add-ci

Conversation

@achris7

@achris7 achris7 commented Jun 16, 2026

Copy link
Copy Markdown
Member

The repo had no PR CI — publish.yml only runs on push to main, so tests/lint never ran on pull requests. The only PR checks were the merge-conflict check and CodeRabbit. This adds real status checks.

What runs (on pull_request and push to main)

  • lintruff check . (Python 3.13).
  • testpytest matrix over Python 3.10–3.13 (the requires-python range), with .[dev,langchain] installed so the adapter handler tests actually run instead of skipping. fail-fast: false.
  • test-barepytest with only .[dev] (no framework extras). Locks the dependency-free contract: the package + suite must work with no extra installed (handler tests skip cleanly, no import errors). This is exactly the class of bug just caught on PR feat: add LangChain budget-guard integration #3, and it's what publish.yml relies on before releasing.

Hardening (matches the org standard)

  • Actions SHA-pinned (same pins as publish.yml).
  • persist-credentials: false, permissions: contents: read, timeout-minutes, and concurrency with cancel-in-progress to drop superseded runs.

Follow-up (needs a repo admin — can't be done from a workflow file)

To make these required (block merge on red), enable branch protection on main: Settings → Branches → add a rule requiring the lint, test, and test-bare checks to pass. Until then they run and show status but don't gate merges.

Summary by CodeRabbit

  • Chores
    • Added automated continuous integration workflows to ensure code quality and compatibility across Python versions during development.

publish.yml only runs on push to main, so PRs had no test/lint checks. Add a
CI workflow that runs on pull_request (and main): ruff lint, a pytest matrix
over Python 3.10-3.13 with framework extras installed (so adapter handler tests
run, not skip), and a bare .[dev] job that locks the dependency-free contract.
SHA-pinned, persist-credentials false, timeouts — matching the org standard.
@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: ed56142f-f7f9-4e59-b483-fd7d2a81ab0f

📥 Commits

Reviewing files that changed from the base of the PR and between 700c40f and 2bfa709.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml

📝 Walkthrough

Walkthrough

Adds .github/workflows/ci.yml, a new GitHub Actions workflow with three jobs: lint (Ruff), test (Pytest matrix over Python 3.10–3.13 with .[dev,langchain]), and test-bare (Pytest on Python 3.13 with .[dev] only). Triggers on pull requests and pushes to main, with concurrency cancellation and read-only permissions.

Changes

CI Workflow

Layer / File(s) Summary
Lint, test matrix, and bare-dependency jobs
.github/workflows/ci.yml
Adds workflow triggers (pull_request, push to main), concurrency group with cancel-in-progress, read-only contents permission, a lint job running Ruff, a test job running Pytest across Python 3.10–3.13 with .[dev,langchain] extras, and a test-bare job running Pytest on Python 3.13 with only .[dev] extras.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~5 minutes

Poem

A rabbit hops in, checks the code with care,
Ruff sniffs for lint floating in the air,
Pytest leaps across versions three and four,
Bare deps or full — all passing, nothing more.
🐇✅ The warren is green, from main to PR floor!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'ci: add PR test + lint workflow' directly and specifically describes the main change: adding a CI workflow for PR testing and linting.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/add-ci

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

@achris7
achris7 marked this pull request as ready for review June 16, 2026 20:09
Copilot AI review requested due to automatic review settings June 16, 2026 20:09
@achris7

achris7 commented Jun 16, 2026

Copy link
Copy Markdown
Member Author

@CodeRabbit review

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds a GitHub Actions CI workflow so linting and tests run on pull requests (and on pushes to main), aligning CI coverage with the package’s supported Python versions and optional extras strategy.

Changes:

  • Introduces a new CI workflow triggered on pull_request and push to main.
  • Adds lint job running ruff check . (Python 3.13).
  • Adds test matrix (Python 3.10–3.13) with .[dev,langchain] installed, plus a test-bare job that runs tests with only .[dev].

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@achris7
achris7 merged commit ff4e414 into main Jun 16, 2026
8 checks passed
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