Consolidate test workflow infrastructure in CI#3254
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR consolidates Python CI test execution so both the targeted “fast” lane and the full matrix run through the same reusable workflow, reducing duplicated setup logic and drift between lanes.
Changes:
- Refactors the reusable
python-package.ymlworkflow to accept a JSON-defined matrix and to run either full-suite or targeted pytest/functional selections. - Updates
intelligent-testing.ymlto delegate fast and full execution to the reusable workflow instead of running bespoke steps. - Updates selector documentation/comments to reflect the “mode/workflow” terminology.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
tools/test_selector.py |
Updates selector documentation/comments to align with the refactored CI execution model. |
.github/workflows/python-package.yml |
Makes the reusable test workflow parameter-driven (matrix + selected tests) and centralizes installs/execution. |
.github/workflows/intelligent-testing.yml |
Converts fast/full lanes into calls to the shared reusable workflow with appropriate inputs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
1 task
deruyter92
approved these changes
Mar 27, 2026
Replace inline fast/full test job steps with the reusable ./.github/workflows/python-package.yml workflow as the dedicated "running test" workflow and add support for targeted test execution. Introduces new inputs (matrix_json, pytest_paths_json, functional_scripts_json, full_suite) so fast-tests can run a targeted pytest/functional subset while full-tests run a full matrix. Also cleans up shells/flags, installs ffmpeg non-interactively, consolidates TensorFlow installs per-OS, and adds platform-aware filtering for TensorFlow functional scripts to avoid running unsupported combinations on Windows. This centralizes CI logic and makes test selection configurable and DRY.
Update documentation and comments to replace ambiguous "lane" terminology with clearer wording and refine output descriptions. Changes include: swapping "lane" for "mode" in the module docstring, rewording the GitHub output help text for run_skip/run_docs/run_fast/run_full to better describe their intent (docs build, targeted tests, full suite/matrix), and clarifying the LaneSelection.fast comment to mention targeted pytest + optional functional scripts in the test workflow. No functional logic changes.
Normalize indentation for the fast-tests and full-tests job blocks in .github/workflows/intelligent-testing.yml. The changes adjust whitespace only (reindent job keys like name, needs, uses, with, etc.) for consistent YAML formatting; no functional changes to workflow logic or inputs.
07b1bb5 to
623a3d4
Compare
Collaborator
Author
|
Rebased as per #3263 |
Collaborator
…3265) * Update CI: Change windows ffmpeg installation from build instead of chocolatey * Update .github/workflows/python-package.yml Co-authored-by: Cyril Achard <cyril.achard@epfl.ch> * Update .github/workflows/python-package.yml Co-authored-by: Cyril Achard <cyril.achard@epfl.ch> * Update .github/workflows/python-package.yml Co-authored-by: Cyril Achard <cyril.achard@epfl.ch> --------- Co-authored-by: Cyril Achard <cyril.achard@epfl.ch>
…3266) * update format.yml workflow: fix checkout for forked PRs * Limit workflow permissions and checkout creds Restrict the workflow to read-only access and prevent persisting checkout credentials. Adds permissions.contents: read and sets actions/checkout persist-credentials: false to avoid exposing the default GITHUB_TOKEN and set clear permissions. --------- Co-authored-by: Cyril Achard <cyril.achard@epfl.ch>
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.
Summary
This PR consolidates CI test execution so that dependency installation and test/script execution live in a single reusable workflow, instead of being split across multiple jobs with partially duplicated setup logic and different dependencies.
The main goal is to reduce drift between the fast/targeted lane and the full matrix lane, while preserving the current intelligent test-selection behavior.
Requires
mainif Apply linting to entire codebase & add CI workflow to check linting #3216 has been mergedMotivation
Before this change, CI test execution was spread across two workflows/jobs:
This made it easy for the two paths to drift over time, especially around:
In practice, this meant the fast lane could fail for environment reasons that were unrelated to the code under test, simply because its runtime setup no longer matched the full test workflow.
This PR addresses that by making the reusable Python test workflow the single place where CI test environments are setup and where pytest / functional scripts are executed.
What changed
CI architecture
Refactored the reusable Python test workflow so it can serve both:
Updated the intelligent test-selection workflow so it acts primarily as a planner/router:
Dependency/setup consolidation
This PR does not change the high-level test selection policy itself.
In particular: