Skip to content

Run pre-commit in CI, too#450

Open
armins wants to merge 7 commits intomainfrom
run_overcommit_on_ci
Open

Run pre-commit in CI, too#450
armins wants to merge 7 commits intomainfrom
run_overcommit_on_ci

Conversation

@armins
Copy link
Copy Markdown
Collaborator

@armins armins commented Apr 9, 2026

Task

We want to run the same checks in CI as in local dev, see #385

Closes #385

Description

Run precommit (pre-commit and pre-push, latter needs db),
replace existing tests run,
exclude some dirs in precommit

How Has This Been Tested?

in CI

Checklist

  • I have successfully run overcommit locally
  • I have added tests to cover my changes
  • I have linked the issue-id to the task-description
  • I have performed a self-review of my own code

@armins armins marked this pull request as ready for review April 9, 2026 12:33
Copilot AI review requested due to automatic review settings April 9, 2026 12:33
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Aligns CI checks with local Overcommit hooks so CI runs the same pre-commit/pre-push validations described in issue #385.

Changes:

  • Switch GitHub Actions CI to run overcommit --run pre-commit and overcommit --run pre-push instead of bespoke Brakeman/RSpec steps.
  • Refactor Capybara app construction to reliably return the Rack app, and make the rate-limit feature spec self-contained by setting/restoring env/config inside the spec.
  • Expand RuboCop/TrailingWhitespace exclusions to skip .github/, docs/, and images/.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
spec/spec_helper.rb Refactors Capybara app builder to return the Rack app (not the parse tuple) and exposes it for reuse.
spec/features/rate_limit_feature_spec.rb Makes CI-only rate limit feature spec configure/restore env + Capybara app within hooks.
.rubocop.yml Excludes additional non-app directories from RuboCop runs.
.overcommit.yml Excludes additional directories from the TrailingWhitespace hook.
.github/workflows/ruby.yml Runs Overcommit pre-commit and pre-push hooks in CI (replacing direct Brakeman/RSpec steps).

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@armins armins requested a review from whotwagner April 9, 2026 12:56
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.

Run same checks local & CI

2 participants