Skip to content

Add CI workflow to run Flutter unit tests on PRs to master #132

@java-james

Description

@java-james

We don’t have CI running Flutter tests on pull requests into master. Create a GitHub Actions workflow that runs flutter test on a GitHub-hosted runner for every PR targeting master (and on pushes to master), caches dependencies, and uploads coverage as an artifact. I’ll make the workflow a required check via branch protection after it’s merged.

Acceptance criteria:

  • A file .github/workflows/flutter-tests.yml is added.
  • Opening a PR against master runs a single job called flutter-tests on ubuntu-latest.
  • The job caches dependencies between runs.
  • The job executes flutter test --coverage, fails the workflow on failing tests, and uploads coverage/lcov.info as an artifact.
  • The job runs on pushes to master as well.
  • Concurrency prevents duplicate runs on the same ref.

Notes

  • Only unit tests are needed (no emulators, no integration tests).
  • I’ll configure Settings → Branches → Branch protection for master to require the flutter-tests check after this is merged.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions