Skip to content
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

Implement test file correlation #33

Merged
merged 8 commits into from
Jan 5, 2024
Merged

Conversation

benjaminwood
Copy link
Contributor

@benjaminwood benjaminwood commented Jan 5, 2024

This PR implements a method of correlating files from the diff to test files based on how they have changed together over the history of the project. The raw information (only file names) is sent to the backend where we use an algorithm determine the probability of correlation. We then use this information to order the tests such that the tests which are correlated to files in the diff are run first.

Doing this requires a target branch, so it'll only happen in the PR scenario, and only if the target branch is provided to selective. We fetch 1000 commits on the target branch by default, but this will be configurable via the selective dashboard in the future.

@benjaminwood benjaminwood self-assigned this Jan 5, 2024
benjaminwood and others added 6 commits January 5, 2024 18:47
Co-authored-by: Nate Vick <nate.vick@hint.io>
Co-authored-by: Nate Vick <nate.vick@hint.io>
Co-authored-by: Nate Vick <nate.vick@hint.io>
Co-authored-by: Nate Vick <nate.vick@hint.io>
Co-authored-by: Nate Vick <nate.vick@hint.io>
Co-authored-by: Nate Vick <nate.vick@hint.io>
Co-authored-by: Nate Vick <nate.vick@hint.io>
.github/workflows/main.yml Outdated Show resolved Hide resolved
natevick
natevick previously approved these changes Jan 5, 2024
Co-authored-by: Nate Vick <nate.vick@hint.io>
@benjaminwood benjaminwood marked this pull request as ready for review January 5, 2024 20:59
@benjaminwood benjaminwood merged commit 59cd453 into main Jan 5, 2024
4 checks passed
@benjaminwood benjaminwood deleted the test-file-correlation branch January 5, 2024 21:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants