Repository navigation
feat: the CI tests what a pull request changes; labels only add (#405) - #406
Merged
Merged
Conversation
Each changed file gives environments and problems, read from the repository (test environments, extension triggers, the includes of test/common/), and the run is their union. Scope labels add environments instead of restricting the run; `test everything` runs everything. The job summary shows the decision file by file. Co-Authored-By: Claude Opus 5.5 <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.
Written by Claude (Claude Code) at the request of ocots.
Closes #405. Refs #310, #327.
What
tools/ci/scope.pycomputes environments × problems from the files a pull request changes, and the scope labels only add to it. The rules are read from the repository, not written as a list of paths:test/suite/with aProject.toml, without the opt-in ones (OPT_INoftest/runtests.jl);ext/<M>Models/<p>.jlgivesMandcomparisonforp; another file ofext/<M>Models/givesMandcomparisonfor every problem;ext/<E>.jlgives the environments whoseProject.tomlholds every trigger ofE([extensions]ofProject.toml);ext/MetaData/orext/Descriptions/named after a problem gives every environment for that problem (now includingext/MetaData/references/<p>.toml, which ran everything before);test/suite/<env>/**givesenv;test/common/<f>.jlgives the environments whose tests name<f>, directly or throughtest/common/; every environment iftest/runtests.jlnames it (options.jl,run_environment.jland what it includes);test/cron/**,test/robustness/**,tools/**,docs/**and Markdown outsideext/:coreonly;release, push): everything.Labels:
test <M> backendandtest comparisonadd an environment (with the problems of the automatic scope, every problem if it has none: one product, see the comment on #405);test all problemswidens to every problem;test everything(new label) runs everything;test convergenceunchanged. The job summary has one row per file: its environments, problems and why.test/README.md(section Continuous integration, with the table of the rules) and the comments ofCI.ymlare updated. Nothing changes on the Julia side.Done when (#405)
scope.pycomputes environments × problems with the rules; unit tests for every rule and fallback, on a fixture repository, shown to fail on broken rules (below).test everythingruns everything (the label itself is to be created on the repository: see below).CI.yml, so it runs everything, as the rules say).test/README.mdand the comments ofCI.ymlup to date.Tests
Three rules broken on purpose (not committed), then restored:
The new script on the files of recent pull requests (status from the API):
comparisonsrc/)Project.toml)And on single files of this repository:
ext/JuMPModels/beam.jl→JuMP comparison problem=beam;ext/JuMPModels/schemes/build.jl→JuMP comparison;ext/OptimalControlModels.jl→OptimalControl OptimalControlScalarized comparison;test/common/methods.jl→JuMP OptimalControl OptimalControlScalarized;test/common/status.jl→ everything;docs/make.jl→core.To do before merging
test everythingon the repository (not done: an action on the repository, waiting for ocots).No runner label: the CI tooling tests run in the
scopejob without it, and nothing changes on the Julia side.Main checkout
git status --short: empty before and after.Conventions: ct-conventions v0.10.0, ct-agents v0.4.0.
🤖 Generated with Claude Code