ci: Testmon integration for selective unit testing - #6934
Draft
balasaajay wants to merge 21 commits into
Draft
Conversation
- Added support for Testmon in the CI/CD pipeline to enable selective unit-test execution based on PR labels. - Updated `pyproject.toml` and `uv.lock` to include `pytest-testmon` as a dependency. - Modified GitHub Actions workflow to check for the `Run selective unit tests` label and determine eligibility for Testmon. - Enhanced scripts to handle Testmon modes and cache management. - Updated documentation to reflect new Testmon functionality and usage. This integration allows for more efficient testing by running only relevant tests on eligible PRs, improving CI performance. Signed-off-by: Ajay Balasa <abalasa@nvidia.com>
svcnvidia-nemo-ci
marked this pull request as draft
August 27, 2026 22:11
Contributor
|
This PR has been automatically converted to draft because all PRs must start as drafts. When you are ready for review, click Ready for Review to begin the review process. This will:
See the contribution guide for more details. |
|
Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
- Removed unnecessary inputs and streamlined cache key generation in the GitHub Actions workflow. - Updated conditions for determining Testmon modes and cache hits, enhancing clarity and efficiency. - Adjusted documentation to reflect changes in Testmon functionality and usage. - Improved unit tests to align with the new workflow structure and ensure accurate assertions. These changes optimize the Testmon integration, ensuring more reliable and efficient unit testing in the CI/CD pipeline. Signed-off-by: Ajay Balasa <abalasa@nvidia.com>
Contributor
Author
|
/ok to test 2e2f6cf |
- Modified the GitHub Actions workflow to sync only the 'test' group, improving efficiency. - Added installation of `pytest-testmon` version 2.2.0 in the CI test script to ensure compatibility. These changes enhance the Testmon integration, streamlining the testing process in the CI/CD pipeline. Signed-off-by: Ajay Balasa <abalasa@nvidia.com>
Contributor
Author
|
/ok to test 5b548ad |
Signed-off-by: Ajay Balasa <abalasa@nvidia.com>
Contributor
Author
|
/ok to test d29f94c |
- Introduced a `TESTMON_DEPENDENCY_OVERRIDE` variable to specify dependencies for Testmon. - Updated pytest arguments to include the dependency override for both test selection and collection phases. These changes improve the flexibility and reliability of the Testmon integration in unit testing. Signed-off-by: Ajay Balasa <abalasa@nvidia.com>
Signed-off-by: Ajay Balasa <abalasa@nvidia.com>
Contributor
Author
|
/ok to test bc61419 |
Signed-off-by: Ajay Balasa <abalasa@nvidia.com>
Signed-off-by: Ajay Balasa <abalasa@nvidia.com>
Contributor
Author
|
/ok to test 9c1eed5 |
Signed-off-by: Ajay Balasa <abalasa@nvidia.com>
Contributor
Author
|
/ok to test 078947e |
Restore the previous calculator probe, then temporarily reverse the source signature change from NVIDIA#7186. This returns parameter_group.py to the recorded Testmon baseline while preserving existing keyword callers. Keep dependency, container, workflow, and test files unchanged. Signed-off-by: Ajay Balasa <abalasa@nvidia.com>
Contributor
Author
|
/ok to test d71d081 |
Restore the preceding signature probe, then temporarily reverse both source hunks from NVIDIA#7220. Reinstate context-parallel topology rejection to measure selection against the existing database. Leave tests, dependencies, containers, and CI configuration unchanged. Signed-off-by: Ajay Balasa <abalasa@nvidia.com>
Contributor
Author
|
/ok to test bdb06d5 |
Restore the preceding context-parallel validation probe, then temporarily remove the adapter no_sync override introduced in NVIDIA#7186. This returns the adapter file to the recorded baseline and intentionally tests whether selected hybrid accumulation tests catch the behavioral regression. Restore the override after recording results; keep test, dependency, container, and CI files unchanged. Signed-off-by: Ajay Balasa <abalasa@nvidia.com>
Contributor
Author
|
/ok to test 90eb48c |
Restore the adapter no_sync override and imports after recording the expected hybrid accumulation failures. All experimental source edits are now removed, returning the production tree to the earlier documentation control while preserving pre-existing PR changes. Verify cache reuse and restored unit-test behavior without changing tests, dependencies, containers, or CI configuration. Signed-off-by: Ajay Balasa <abalasa@nvidia.com>
Contributor
Author
|
/ok to test 8257c83 |
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 does this PR do?
Based off of #6772
pyproject.tomlanduv.lockto includepytest-testmonas a dependency.Run selective unit testslabel and determine eligibility for Testmon.This integration allows for more efficient testing by running only relevant tests on eligible PRs, improving CI performance.
Issue tracking
For PRs from open-source community contributors:
Linked issue:
Contribution process
Pre-checks
Code review
Feel free to message or comment @NVIDIA/mcore-oncall to help accelerate your merge into main. The less complex your PR is, the faster it will be approved and merged!
All PRs start as draft. If you open a non-draft PR, it will be automatically converted to draft.
Step 1: Mark PR as "Ready for Review"
.github/CODEOWNERS.Final Review might get declined if these requirements are not fulfilled.
Step 2: Final Review
For PRs that change
megatron/core, once all expert reviewers have approved, theFinal Reviewlabel is applied automatically and final reviewers are assigned.For PRs outside
megatron/core, this step is skipped.Step 3: Approved
Once all required reviewers have approved, the
Approvedlabel is applied automatically.Merge
Any member of mcore-engineers will be able to merge your PR.