native icon indicating copy to clipboard operation
native copied to clipboard

[infra] Consider combining coverage for `native_` packages

Open dcharkes opened this issue 9 months ago • 1 comments

Currently, we run coverage for all packages individually. This means that integration tests in package:native_assets_builder don't get counted for package:native_assets_cli.

We don't want to count code that is not covered as dead code if it's not dead when used by another package. Also, we don't want to write unit tests (which might not do the right thing) just to increase code coverage. Integration tests are more likely to do the right thing.

When we turn the native_ packages into a pub workspace (https://github.com/dart-lang/native/issues/1223), we should consider combining the coverage runs into one.

Possible tech to do this:

  • https://pub.dev/packages/combine_coverage

(Secondly, we should also consider simplifying the CI to run some kind of dart workspace test command for all packages in the workspace, rather than a separate bot doing dart test for each package individually. We always run the bots for all these packages anyway.)

dcharkes avatar Apr 04 '25 08:04 dcharkes

This needs to be implemented in package:coverage first:

  • https://github.com/dart-lang/tools/issues/2083

dcharkes avatar May 01 '25 08:05 dcharkes