Skip to content

Verify committed mocks are up to date in CI - #1366

Open
sneurlax wants to merge 1 commit into
stagingfrom
test/mocks
Open

Verify committed mocks are up to date in CI#1366
sneurlax wants to merge 1 commit into
stagingfrom
test/mocks

Conversation

@sneurlax

Copy link
Copy Markdown
Member

Instead of blindly regenerating mocks (which conflicts with the repo's approach of committing them), run build_runner then check git diff --exit-code so CI fails clearly if committed mocks are stale rather than silently running tests against outdated files.

@codecov

codecov Bot commented May 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 4.84%. Comparing base (8208fe7) to head (9b26321).
⚠️ Report is 1 commits behind head on staging.

Additional details and impacted files
@@           Coverage Diff            @@
##           staging    #1366   +/-   ##
========================================
  Coverage     4.84%    4.84%           
========================================
  Files         1092     1092           
  Lines       109141   109141           
========================================
  Hits          5283     5283           
  Misses      103858   103858           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

The repo commits its generated code (52 *.mocks.dart, 42 *.g.dart) and
build.yaml never runs build_runner, so releases are compiled from exactly
what is checked in — but nothing checked that it still matches its
sources. Run build_runner in the test job and fail on any *.mocks.dart or
*.g.dart the generators would rewrite, pointing at
scripts/dev/build_runner.sh.

The step also works around two generator quirks, commented inline:
--delete-conflicting-outputs deletes the gitignored generated app config,
and hive_ce emits an untracked registrar this repo never imports.
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.

1 participant