When a pull request is opened in the system-tests repository, the CI does not run every test for every library. Instead, it looks at the files modified in the PR and determines which libraries and scenario groups are relevant. This mechanism is called CI test selection.
The selection rules live in
utils/scripts/libraries_and_scenarios_rules.yml.
The file itself contains an embedded guide on syntax, ordering, and YAML pitfalls --
read it before making changes.
- The CI job Compute libraries and scenarios collects the list of files modified in the PR.
- Each file is matched top-down against the patterns in
libraries_and_scenarios_rules.yml. The first match wins. - The matched rule decides which libraries to build and which scenario groups to run.
The job prints a summary of the selected libraries and scenario groups at the end of its output. It also emits debug-level logs showing which file matched which pattern, which is helpful for troubleshooting unexpected selections.
- You add a new file or directory to the repo and want to control which tests the CI runs (or skips) when it is modified.
- You want to disable CI for a path (e.g. documentation, tooling) so that modifying it does not trigger any test run.
- You need to change the test scope associated with an existing path.
Each entry maps a file pattern to the libraries and scenario groups to select:
"some/path/*":
libraries: [java, python]
scenario_groups: [end_to_end]| Field | Missing (omitted) | null or [] |
Explicit list |
|---|---|---|---|
libraries |
Select all libraries | Select none | Select exactly those |
scenario_groups |
Select all groups (see [1]) | Select none | Select exactly those |
scenarios |
Select all groups (see [1]) | Select none | Select exactly those |
[1] All scenario groups are selected only when both scenario_groups and
scenarios are omitted. If either one is present, only its value is used.
Use
scenario_groupswhen you want to target a category of scenarios, andscenarioswhen you need to target a single scenario by name. Valid scenario group names are listed inutils/_context/_scenarios/core.py.
Important: The DEFAULT scenario always runs on every selected library, even
if scenario_groups and scenarios are both set to null. In other words, as
long as at least one library is selected (explicitly or by omitting the field), the
DEFAULT scenario will be executed for it. To fully skip CI for a path, you must set
both libraries: null and scenario_groups: null.
Skip CI entirely for a path (no libraries, no scenarios):
"my/tooling/*":
scenario_groups: null
libraries: nullRestrict to a single library:
"utils/build/docker/python/*":
libraries: pythonRestrict to specific scenario groups:
"utils/docker_ssi/*":
scenario_groups: docker_ssiRun everything (default when both fields are omitted):
"conftest.py": # empty value -> all libraries, all scenario groupsThe CI job Compute libraries and scenarios (in
.github/workflows/compute_libraries_and_scenarios.yml) outputs the final
selection at the end of its run. If the selection is not what you expect:
- Open the job logs in GitHub Actions.
- Look at the Print results step for the final computed values.
- Look for
debug-level log lines in the Compute libraries and scenarios step -- they show which pattern each modified file matched (or warn when no pattern matched, which causes all libraries/groups to be selected).
Changes to the rules file are covered by unit tests in
tests/test_the_test/test_compute_libraries_and_scenarios.py.