Repository navigation
[packages] Add file-based test filtering #136394
Description
Currently all of the CI test filtering is based on packages changed. This helps a lot, but there are categories of changes within a package where we run a lot of tests that we could easily determine to be unnecessary. It would be useful to add a generic utility to the command system in the repo tooling where commands could explicitly list files that cannot affect their output (the reverse would be simpler, but would be much more likely to accidentally not run tests, and we want to minimize the possibility of that).
Some obvious examples:
- README.md changes can only affect README validations.
- CHANGELOG.md changes can only affect changelog/version validations.
- pubspec.yaml changes that only affect the version line (we'll need to special-case this, but if we don't the whole system would be pretty pointless since almost all changes bump the version) only affect version and pubspec validations.
- test/*.dart test changes can't affect integration tests or native tests.
- integration_test/*.dart changes can't affect native unit tests or Dart unit tests
The generic support would take a list from the command and validate it against every changed file, and then skip tests for any package where everything matched.
We could skip expensive tests like integration tests for all of those cases.
Activity
flutter-triage-bot commentedon Oct 13, 2023
The
fyi-ecosystemlabel is redundant with theteam-ecosystemlabel.[tool] Move changed file detection to base command class (#8730)
[tool] Add initial file-based command skipping (flutter#8928)
github-actions commentedon May 2, 2025
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.[tool] Add initial file-based command skipping (#8928)
[tool] Add initial file-based command skipping (flutter#8928)
[tool] Add initial file-based command skipping (flutter#8928)
[tool] Add initial file-based command skipping (flutter#8928)
[tool] Add initial file-based command skipping (flutter#8928)
[tool] Add initial file-based command skipping (flutter#8928)