ci: run format check, analyze and tests on pull requests - #279
Merged
Conversation
The existing build-and-deploy workflow only triggers on version tags and manual dispatch, so pull requests (including Dependabot's) get no automated checks at all. Add a lightweight workflow that runs the same lint gate (dart format --set-exit-if-changed, flutter analyze, flutter test) on every pull request and on pushes to main. The build matrix stays tag-only: it needs repository secrets, which Dependabot and fork PRs don't receive, and would be slow and wasteful per-PR. The lint gate needs no secrets, so it runs safely on any PR. AI-Assisted: Claude:Fable-5 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
These files were merged unformatted — possible because the format gate only ran on tag builds. The next release build would have failed on them; the new PR workflow caught it on its own PR instead. Verified locally: flutter analyze clean, all 447 tests pass. AI-Assisted: Claude:Fable-5 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Collaborator
Author
|
The first run failed on the format check — and usefully, not because of this PR: 14 files on Pushed a follow-up |
12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Note
This PR was written with the assistance of Claude Code.
Description
Pull requests currently get no automated checks: the only workflow (
build-and-deploy.yml) triggers exclusively on version tags and manual dispatch. This became visible with the open Dependabot PRs (#171, #173, #174, #205, #206), which all show "no checks reported" — there is no automated signal on whether a dependency bump (or any PR) even compiles.This adds a lightweight
pr-checks.ymlworkflow that runs the exact same lint gate as the release workflow —dart format --set-exit-if-changed,flutter analyze,flutter test— on every pull request and on pushes tomain.Design notes:
SCREENSCRAPER_DEV_ID/SCREENSCRAPER_DEV_PASSWORD, signing), which Dependabot and fork PRs don't receive, and a full 4-platform build per PR would be slow and wasteful. The lint gate needs no secrets, so it runs safely on any PR, including Dependabot's.push: mainis included so a merge that slips past (or an out-of-date branch merge) is caught immediately rather than at the next release tag.lintjob inbuild-and-deploy.ymlverbatim (same actions, same flags). The small duplication is deliberate — happy to convert the shared job to a reusableworkflow_callinstead if you'd prefer.This PR validates itself: since the new workflow carries a
pull_requesttrigger, it runs on this very PR.Type of Change
Checklist
flutter analyzeand there are no errors. (No Dart code touched; the workflow itself runs it on this PR.)Screenshots (if applicable)
N/A
🤖 Generated with Claude Code