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

Run functionalTest on MavenLocal #4905

Closed

Conversation

cortinico
Copy link
Member

This tries to address the problem I had in #4900

Essentially, our Gradle Plugin tests are currently running by fetching detekt-cli from Maven Central/Local. The problem is that once I bump the version and publishToMavenLocal during the release process, I'm effectivelly exposed to all the tests failures that got never reported on main as we're using a older version of detekt-cli.

With this PR, I'm bumping the version to use the "next", and forcing the build task to depend on publishToMavenLocal. This will make sure the Gradle Plugin tests on CI are effectively running on a locally crafted version of detekt-cli.

I agree that this is not idea, as we should instead inject the class-path, but this is better than the status quo. Looking for opinions.

To reproduce this:

  • Add the @ActiveByDefault to the MissingPackageDeclaration rule
  • Verify that tests are actually failing inside the Gradle Plugin
  • Previously they were not (that's how Active rules by default #4875 got merged)

@codecov
Copy link

codecov bot commented Jun 3, 2022

Codecov Report

Merging #4905 (8a88441) into main (ad9ef16) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##               main    #4905   +/-   ##
=========================================
  Coverage     84.83%   84.83%           
  Complexity     3494     3494           
=========================================
  Files           496      496           
  Lines         11514    11514           
  Branches       2129     2129           
=========================================
  Hits           9768     9768           
  Misses          685      685           
  Partials       1061     1061           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ad9ef16...8a88441. Read the comment docs.

@cortinico
Copy link
Member Author

Seems like we need to a task dependency between :detekt-cli:publishToMavenLocal and :detekt-gradle-plugin:test. Not sure we really want to go this way 🤔

@github-actions
Copy link

github-actions bot commented Sep 2, 2022

This PR is stale because it has been open 90 days with no activity. Please comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale label Sep 2, 2022
@cortinico
Copy link
Member Author

Should we close this in favor of #5149 @3flex ?

@3flex
Copy link
Member

3flex commented Sep 6, 2022

I think so, if you're in general ok with that approach. I'll finish it off sometime soon I hope!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants