ci: only run test suites for solvers changed in a PR#302
Merged
Conversation
Add a `changes` gate job (dorny/paths-filter) that maps changed paths to per-solver booleans; each test job now runs only when its solver's source, tests, or shared/core code changed. A `shared` filter (base/utils/functions/ electrostatic/normalization/driftdiffusion/mlflow, pyproject, uv.lock, run.py, conftest, this workflow, the setup action) is folded into every solver filter via a YAML anchor, so touching cross-cutting code still runs all suites. Pushes to main and manual dispatches force the full matrix (run_all) for complete coverage on the protected branch. Job names are unchanged so existing required status checks keep matching; skipped jobs report as passing. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Stop running every solver's test suite on every PR. A new
changesgate job maps the PR's changed paths to per-solver booleans (viadorny/paths-filter), and eachtest-*job now runs only when its solver's source, tests, or shared code changed.There are a lot of solvers now, and running all of them on every commit is wasteful — this scopes CI to what a PR actually touches.
How it decides
test-lpse2druns iffadept/_lpse2d/**,adept/lpse2d.py, ortests/test_lpse2d/**changed (and likewise for the other five).sharedfilter is folded into every solver filter via a YAML anchor, so touching cross-cutting code runs all suites. It covers_base_.py,utils.py,functions.py,electrostatic.py,normalization.py,driftdiffusion.py,mlflow_logging.py,patched_mlflow.py,__init__.py, pluspyproject.toml,uv.lock,run.py,tests/conftest.py, the setup action, and this workflow itself. (driftdiffusion.pyis imported by base/vlasov1d/vfp1d, hence shared.)main: pushes tomainand manual dispatches force the full matrix (run_all), so nothing is skipped on the protected branch.Compatibility
test-base,test-lpse2d, …), so any required status checks keep matching.if:(not a workflow-levelpaths:filter), so the workflow always triggers and skipped jobs report as passing — a PR can't get stuck waiting on a check that never runs.Notes
main. The hermite jobs land via feat: mixed Hermite-Legendre 1D Vlasov-Poisson solver (arXiv:2606.12322) #289; once this merges, that PR can gate its jobs the same way (rebase re-adds them under the same pattern).dorny/paths-filteraction. Happy to swap for a plaingit diffstep if you'd prefer no new action dependency.🤖 Generated with Claude Code