A pull request (PR) validation pipeline runs the full suite of 9,000 automated tests, which takes about 70 minutes. Most pull requests change a single module. The full suite also runs every night on the main branch. PR validation must still run the tests that cover the changed code. Only one agent is available for PR validation, and the team cannot add more agents.
Which change shortens the PR validation run without adding agents?
Most PRs touch one module, yet every PR runs all 9,000 tests. The source recommends running affected tests for PRs to reduce execution time. This preserves testing of the changed code, uses the available agent, and leaves the nightly full-suite run in place.
- Not correct: Distribute the test suite across several agents. The source describes distributing tests across agents as a parallel strategy. Only one agent is available for PR validation, and adding agents is prohibited.
- Correct: Run the tests affected by each PR's changes. The source lists running affected tests for PRs as a test optimization. This retains tests covering the changed code while the full suite continues to run nightly.
- Not correct: Run the fast unit tests for every PR. Selecting tests by speed can omit slower tests that cover the changed code.
- Not correct: Add a minimum code coverage threshold gate. Adding a threshold does not reduce the test suite being executed.