Skip to content

Enable Predictive Test Selection for local builds#5170

Merged
cortinico merged 2 commits into
detekt:mainfrom
3flex:4992-pts
Aug 2, 2022
Merged

Enable Predictive Test Selection for local builds#5170
cortinico merged 2 commits into
detekt:mainfrom
3flex:4992-pts

Conversation

@3flex

@3flex 3flex commented Aug 2, 2022

Copy link
Copy Markdown
Member

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

codecov Bot commented Aug 2, 2022

Copy link
Copy Markdown

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.

@schalkms schalkms left a comment

Copy link
Copy Markdown
Member

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

3flex commented Aug 2, 2022

Copy link
Copy Markdown
Member Author

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

schalkms commented Aug 2, 2022

Copy link
Copy Markdown
Member

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