Skip to content

ci: add GitHub Actions workflow - #2

Merged
t0kubetsu merged 3 commits into
mainfrom
ci/add-github-actions-workflow
Aug 12, 2026
Merged

ci: add GitHub Actions workflow#2
t0kubetsu merged 3 commits into
mainfrom
ci/add-github-actions-workflow

Conversation

@t0kubetsu

Copy link
Copy Markdown
Contributor

What

Adds .github/workflows/ci.yml — lint + tests on push and PR to main, across Python 3.11, 3.12 and 3.13.

Why

This repository had no CI. Nothing verified that a change compiled, linted, or passed its tests before reaching main — the recent Dependabot batch on mailvalidator merged against checks=0, where a green "mergeable" only ever meant "no merge conflict".

Hardening

Applied per GitHub's published guidance, matching the standard already set by testing-platform-backend:

Measure Why
Actions pinned to full commit SHAs A tag is mutable; @v4 can be repointed at new code
permissions: contents: read The default GITHUB_TOKEN grant is far wider than this needs
persist-credentials: false Otherwise a usable token stays in .git/config for later steps
concurrency + cancel-in-progress A new push supersedes the previous run
fail-fast: false One failing interpreter must not mask the others
timeout-minutes A hung job cannot hold a runner indefinitely

No workflow interpolates github.event.* or github.head_ref into a run: block, so there is no script-injection surface.

Verified locally

ruff clean and the full suite green before opening this PR.

Also adds .github/dependabot.yml, which this repo lacked entirely — pip plus github-actions. The actions ecosystem matters here specifically: pinning to SHAs is only safe if something bumps them, otherwise the pins silently rot.

Runs lint and the test suite on push and pull request to main, across
Python 3.11-3.13 (the range pyproject declares via requires-python).

Hardening per GitHub's own recommendations: actions pinned to full
commit SHAs, permissions: contents: read, persist-credentials: false,
concurrency cancellation, fail-fast: false, timeout-minutes.

Also adds `.github/dependabot.yml`, which this repo lacked entirely — pip plus **github-actions**. The actions ecosystem matters here specifically: pinning to SHAs is only safe if something bumps them, otherwise the pins silently rot.
@coderabbitai

coderabbitai Bot commented Aug 12, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@t0kubetsu, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 15 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 09eaa338-3c06-46aa-bbc6-cf112a473b0a

📥 Commits

Reviewing files that changed from the base of the PR and between ba05c19 and 738d3b5.

📒 Files selected for processing (3)
  • .github/dependabot.yml
  • .github/workflows/ci.yml
  • pyproject.toml

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

@greptile-apps

greptile-apps Bot commented Aug 12, 2026

Copy link
Copy Markdown

Greptile Summary

Adds GitHub Actions CI and Dependabot automation for the repository.

  • Runs linting and tests across Python 3.11, 3.12, and 3.13.
  • Hardens workflow permissions, credentials, concurrency, timeouts, and action pinning.
  • Defines a stable Ruff target and explicit lint rule selection.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
.github/workflows/ci.yml Adds a hardened CI matrix that installs development dependencies, lints application and test code, and runs the test suite.
.github/dependabot.yml Enables daily dependency updates for Python packages and pinned GitHub Actions.
pyproject.toml Adds explicit Ruff configuration targeting Python 3.11 with a stable selected rule set.

Reviews (3): Last reviewed commit: "ci: lint tests/ as well, per the repo's ..." | Re-trigger Greptile

Comment thread .github/workflows/ci.yml Outdated
The first CI run failed on every module, in two ways tracing to one root
cause: lint was never actually pinned down.

1. 'ruff: command not found' — ruff is required by the before-commit
   checklist but was absent from the dev extras, so pip install -e
   '.[dev]' never provided it. It passed locally only because developer
   venvs had it installed by hand.

2. Lint failures on a clean checkout — with no [tool.ruff] section the
   linted rule set is whatever the installed ruff defaults to, and that
   widens each release, so a green local run and a red CI run could
   disagree purely by version.

Copies the pattern portscanner already used (the only module that
passed): pin target-version, state select = [E4, E7, E9, F] explicitly,
add ruff>=0.6 to dev. No source change needed — every module passes this
rule set as-is.
The lint step covered only fileanalyzer/, while this repo's documented
lint standard includes tests/ — violations in test code bypassed the
new gate. Verified clean over both paths.
@t0kubetsu
t0kubetsu merged commit 239c614 into main Aug 12, 2026
4 checks passed
@t0kubetsu
t0kubetsu deleted the ci/add-github-actions-workflow branch August 12, 2026 13:51
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.

1 participant