Add Flutter CI: analyze, test, and coverage badge#25
Merged
hawkbee1 merged 3 commits intogame_clockfrom Mar 27, 2026
Merged
Conversation
Agent-Logs-Url: https://github.com/hawkbee1/game_clock_sandbox/sessions/ff562611-9f5f-46a9-a037-156acd3eaa2b Co-authored-by: hawkbee1 <49282360+hawkbee1@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add GitHub action to run Flutter tests and check code coverage
Add Flutter CI: analyze, test, and coverage badge
Mar 27, 2026
hawkbee1
reviewed
Mar 27, 2026
| run: flutter analyze | ||
|
|
||
| - name: Run Flutter tests with coverage | ||
| run: flutter test --coverage |
Contributor
Author
There was a problem hiding this comment.
Done in 43845e3. Added continue-on-error: true to the test step so coverage extraction and badge update always run even when tests fail. A final step at the end of the job then exits with failure if the tests did fail, keeping the CI status badge accurate.
Agent-Logs-Url: https://github.com/hawkbee1/game_clock_sandbox/sessions/b8ce7f26-b08b-48af-b905-ef1503e1b43b Co-authored-by: hawkbee1 <49282360+hawkbee1@users.noreply.github.com>
hawkbee1
approved these changes
Mar 27, 2026
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.
No CI existed for this Flutter project. Adds a GitHub Actions workflow covering static analysis, testing, coverage reporting, and auto-updating README badges.
Workflow (
.github/workflows/flutter_ci.yml)Triggers on push and PRs targeting
game_clock.flutter analyze— static analysis/lintingflutter test --coverage— runs all unit and widget tests, emitscoverage/lcov.infolcov --summarygame_clockonly) — rewrites the coverage badge URL inREADME.mdwith colour thresholds: ≥80%brightgreen, ≥60%yellow, <60%red; commits back with[skip ci]to prevent loopsREADME badges
Two badges added at the top of
README.md:The test badge reflects workflow pass/fail dynamically via GitHub's built-in badge endpoint. The coverage badge is updated in-place by the workflow on each push.
⌨️ Start Copilot coding agent tasks without leaving your editor — available in VS Code, Visual Studio, JetBrains IDEs and Eclipse.