Skip to content

Preserve package coverage across filtered CI runs - #1584

Open
skylartaylor wants to merge 1 commit into
Baseflow:mainfrom
prismplural:fix/codecov-package-carryforward
Open

skylartaylor wants to merge 1 commit into
Baseflow:mainfrom
prismplural:fix/codecov-package-carryforward

Conversation

@skylartaylor

Copy link
Copy Markdown
Contributor

The Codecov project check compares incomplete reports on package-only pull requests. On #1546, CI correctly skipped the unchanged platform-interface package, but both packages upload under the shared unittests flag. With one upload instead of two, Codecov reported 71.42% instead of 89.84%, although none of the measured Dart files changed.

Upload coverage under each package's name and configure carryforward for the two tested packages. Restrict each flag to its package and each upload to its explicit LCOV file. Changes to the Codecov configuration run both suites so a full baseline is established before later partial runs carry coverage forward. Existing project and patch thresholds are unchanged.

Reproduction: #1546 (comment). No separate issue tracks this CI bug.

Validation:

  • Codecov's hosted YAML validator accepts the configuration.
  • actionlint passes for both edited workflows.
  • Path-filter checks with picomatch verify that Codecov/workflow changes run both coverage suites, Windows changes continue to select only the app-facing and Windows jobs, platform-interface changes still run all package jobs, and root README changes run none.
  • Both coverage-producing Dart suites pass: 20 app-facing tests and 48 platform-interface tests. Their reports total 115 covered lines out of 128 (89.84%). Every measured source file matches exactly one package flag.
  • git diff --check passes.

This is a CI-only change, so it needs no package version bump, changelog entry or product test. Native example builds, Dart formatting and static analysis were not rerun locally; the PR's CI will run the existing package jobs. Repository-wide actionlint also reports an existing obsolete actions/stale@v8 warning in the unchanged no-response workflow; the two edited workflows are clean. Hosted carryforward behavior still needs confirmation after publishing, merging and establishing the new flags on main. Rebase #1546 onto that main to pick up the fix.

Pre-launch Checklist

  • I made sure the project builds.
  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I updated pubspec.yaml with an appropriate new version according to the pub versioning philosophy, or this PR is does not need version changes.
  • I updated CHANGELOG.md to add a description of the change.
  • I updated/added relevant documentation (doc comments with ///).
  • I rebased onto main.
  • I added new tests to check the change I am making, or this PR does not need tests.
  • I made sure all existing and new tests are passing.
  • I ran dart format . and committed any changes.
  • I ran flutter analyze and fixed any errors.

@codecov

codecov Bot commented Nov 6, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.84%. Comparing base (0241e81) to head (ba1b3cf).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1584   +/-   ##
=======================================
  Coverage   89.84%   89.84%           
=======================================
  Files           7        7           
  Lines         128      128           
=======================================
  Hits          115      115           
  Misses         13       13           
Flag Coverage Δ
permission_handler 71.42% <ø> (?)
permission_handler_platform_interface 96.77% <ø> (?)
unittests ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 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.

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