Skip to content

ci: run format check, analyze and tests on pull requests - #279

Merged
androosio merged 2 commits into
misobadev:mainfrom
androosio:ci/pr-lint-checks
Aug 3, 2026
Merged

ci: run format check, analyze and tests on pull requests#279
androosio merged 2 commits into
misobadev:mainfrom
androosio:ci/pr-lint-checks

Conversation

@androosio

Copy link
Copy Markdown
Collaborator

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.yml workflow 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 to main.

Design notes:

  • The build matrix stays tag-only. It needs repository secrets (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: main is included so a merge that slips past (or an out-of-date branch merge) is caught immediately rather than at the next release tag.
  • Concurrency cancellation stops superseded runs when a PR is force-pushed/updated.
  • The steps mirror the lint job in build-and-deploy.yml verbatim (same actions, same flags). The small duplication is deliberate — happy to convert the shared job to a reusable workflow_call instead if you'd prefer.

This PR validates itself: since the new workflow carries a pull_request trigger, it runs on this very PR.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds capability)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation improvement
  • Code refactoring

Checklist

  • I have run flutter analyze and there are no errors. (No Dart code touched; the workflow itself runs it on this PR.)
  • I have added tests demonstrating that my fix or feature works. (N/A — CI configuration; the workflow running on this PR is the demonstration.)
  • I have updated the corresponding documentation.
  • My changes do not introduce secrets, credentials, or sensitive data.
  • I have verified that any new assets have compatible licenses. (No new assets.)
  • Tested on: [ ] Windows | [ ] Linux | [ ] macOS | [ ] Android (N/A — no app change.)
  • Gamepad support verified (N/A).

Screenshots (if applicable)

N/A

🤖 Generated with Claude Code

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>
@androosio

Copy link
Copy Markdown
Collaborator Author

The first run failed on the format check — and usefully, not because of this PR: 14 files on main (l10n files, sqlite_migrations.dart, game-details tabs, three tests) had drifted out of dart format compliance, which went unnoticed because the format gate previously only ran on tag builds. The next release build would have failed on them.

Pushed a follow-up style: commit formatting those 14 files (verified locally: flutter analyze clean, all 447 tests pass).

@androosio
androosio merged commit 6235e70 into misobadev:main Aug 3, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this from Backlog to Done in NeoStation Aug 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant