Navigation Menu

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

Enable Predictive Test Selection for local builds #5170

Merged
merged 2 commits into from Aug 2, 2022

Conversation

3flex
Copy link
Member

@3flex 3flex commented Aug 2, 2022

Closes #4992

Example results: https://ge.detekt.dev/s/zw2mley3hbwz6/tests/overview. The build was run simply with ./gradlew test on the main branch.

This enables PTS only for local builds. Gradle recommends enabling PTS for local builds and PRs, however it's simpler and lower risk to leave disabled on CI entirely. Maybe we can enable on PRs too once we have some experience with it.

This doesn't apply to detekt-gradle-plugin, which is unfortunate because it's the slowest test suite, but currently included builds are not supported so this is a technical limitation. Config can be updated in future if this changes.

This is an @Internal property so the different value in CI & non-CI builds doesn't impact remote build cache hits.

@codecov
Copy link

codecov bot commented Aug 2, 2022

Codecov Report

Merging #5170 (4a59f8c) into main (090b5bc) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##               main    #5170   +/-   ##
=========================================
  Coverage     84.98%   84.98%           
  Complexity     3634     3634           
=========================================
  Files           502      502           
  Lines         11966    11966           
  Branches       2255     2255           
=========================================
  Hits          10169    10169           
  Misses          689      689           
  Partials       1108     1108           

Help us with your feedback. Take ten seconds to tell us how you rate us.

Copy link
Member

@schalkms schalkms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Interesting!
I’m curious how the results including false-positives will be.

@3flex
Copy link
Member Author

3flex commented Aug 2, 2022

Me too! This report can be used to monitor: https://ge.detekt.dev/scans/test-selection

I haven't delved into it but in theory that will surface any issues... Though the ML model should take those issues and incorrect misses and improve over time.

@schalkms
Copy link
Member

schalkms commented Aug 2, 2022

Yeah, let’s see how it works out. Later on, we can still enable PTS for PRs too.

@cortinico cortinico merged commit d42e6f0 into detekt:main Aug 2, 2022
@cortinico cortinico added this to the 1.22.0 milestone Aug 2, 2022
@3flex 3flex deleted the 4992-pts branch August 2, 2022 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Enable Predictive Test Selection
4 participants