-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add test-execution optimization and sharding options #216
Merged
Conversation
This file contains 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
lukfor
changed the title
Add test-exection optimization and sharding options
Add test-execution optimization and sharding options
May 12, 2024
Thanks for the info! |
This is excellent. I would be happy to replace the Python internals of my GHA with this once it's available! |
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.
This PR addresses #199.
Optimizing Test Execution
--related-tests <files>
Finds and executes all related tests for the provided .nf or nf.test files. Multiple files can be provided space separated.
--follow-dependencies
When this flag is set, nf-test will traverse all dependencies when the related-tests flag is set.
This option is particularly useful when you need to ensure that
all dependent tests are executed, bypassing the firewall calculation process.
--only-changed
When enabled, this parameter instructs nf-test to execute tests only for files that have been modified within the
current git working tree.
--changed-since <commit_hash|branch_name>
This parameter triggers the execution of tests related to changes made since the specifie commit.
e.g.
--changed-since HEAD^
for all changes between the HEAD and HEAD - 1.--changed-until <commit_hash|branch_name>
This parameter initiates the execution of tests related to changes made until the specified commit hash.
--graph <filename>
Enables the export of the dependency graph as a dot file.
The dot file format is commonly used for representing graphs in graphviz and other related software.
Sharding
This parameter allows users to divide the execution workload into manageable chunks, which can be useful for
parallel or distributed processing.
--shard <shard>
Splits the execution into arbitrary chunks defined by the format
i/n
, wherei
denotes the index of the currentchunk and
n
represents the total number of chunks. For instance,2/5
executes the second chunk out of five.--shard-strategy <strategy>
Description: Specifies the strategy used to build shards when the
--shard
parameter is utilized.Accepted values are
round-robin
ornone.
. This parameter determines the method employed to distribute workloadchunks among available resources. With the round-robin strategy, shards are distributed evenly among resources in
a cyclic manner. The none strategy implies that shards won't be distributed automatically, and it's up to the
user to manage the assignment of shards. Default value is
round-robin
.