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

Don't compile test snippets #2105

Merged
merged 2 commits into from
Nov 26, 2019
Merged

Don't compile test snippets #2105

merged 2 commits into from
Nov 26, 2019

Conversation

BraisGabin
Copy link
Member

Closes #2095

We need to check that our production is OK every time. But we don't need to check that our tests are OK every time too.

This change speeds up the tests about 2.5 times.

What do you think about the naming? I'm not sure...

@BraisGabin BraisGabin changed the title Dont compile test snippets Don't compile test snippets Nov 19, 2019
@codecov-io
Copy link

codecov-io commented Nov 19, 2019

Codecov Report

Merging #2105 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #2105   +/-   ##
=========================================
  Coverage     80.62%   80.62%           
  Complexity     2015     2015           
=========================================
  Files           336      336           
  Lines          5802     5802           
  Branches       1057     1057           
=========================================
  Hits           4678     4678           
  Misses          563      563           
  Partials        561      561

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 39fd293...4f511a0. Read the comment docs.

@schalkms
Copy link
Member

That's interesting. It works for AppVeyor but not for Travis?

@BraisGabin
Copy link
Member Author

Here are the builds testing that if one of your snippet doesn't compile the CI complains abot it:

  • Travis
  • AppVenyor: it failed in another run too... but I think that it was just flaky.

This is ready to merge if you are OK with the naming.

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.

Thanks! This looks fine and is an improvement over the old CI behavior! If @arturbosch is okay with it, we should merge this asap.

@BoxResin
Copy link
Contributor

There're some conflicts to resolve.

If you want to check that your code in the snippets compiles you can use the flag
-Pcompile-test-snippets=true in gradle
@BraisGabin
Copy link
Member Author

Rebased to fix the conflicts

Copy link
Member

@arturbosch arturbosch left a comment

Choose a reason for hiding this comment

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

Awesome. I will try a build offline now :).
A good step forward to make compileAndLint the default and rename it to just lint later ^^

@arturbosch arturbosch merged commit d3b1de2 into detekt:master Nov 26, 2019
@arturbosch arturbosch added this to the 1.2.1 milestone Nov 26, 2019
schalkms added a commit that referenced this pull request Nov 30, 2019
follow-up: #2105

This further speeds up detekt's CI and the tests runs on our local dev machines. The Jsr223 compiles engines aren't even created at startup anymore if the environment variable compile-snippet-tests is set to false.
arturbosch pushed a commit that referenced this pull request Dec 5, 2019
* Don't compile the snippet codes in the test by default

If you want to check that your code in the snippets compiles you can use the flag
-Pcompile-test-snippets=true in gradle

* Configure travis and appvenyor to compile the snippets
arturbosch pushed a commit that referenced this pull request Dec 5, 2019
follow-up: #2105

This further speeds up detekt's CI and the tests runs on our local dev machines. The Jsr223 compiles engines aren't even created at startup anymore if the environment variable compile-snippet-tests is set to false.
smyachenkov pushed a commit to smyachenkov/detekt that referenced this pull request Dec 9, 2019
* Don't compile the snippet codes in the test by default

If you want to check that your code in the snippets compiles you can use the flag
-Pcompile-test-snippets=true in gradle

* Configure travis and appvenyor to compile the snippets
smyachenkov pushed a commit to smyachenkov/detekt that referenced this pull request Dec 9, 2019
follow-up: detekt#2105

This further speeds up detekt's CI and the tests runs on our local dev machines. The Jsr223 compiles engines aren't even created at startup anymore if the environment variable compile-snippet-tests is set to false.
smyachenkov pushed a commit to smyachenkov/detekt that referenced this pull request Dec 9, 2019
* Don't compile the snippet codes in the test by default

If you want to check that your code in the snippets compiles you can use the flag
-Pcompile-test-snippets=true in gradle

* Configure travis and appvenyor to compile the snippets
smyachenkov pushed a commit to smyachenkov/detekt that referenced this pull request Dec 9, 2019
follow-up: detekt#2105

This further speeds up detekt's CI and the tests runs on our local dev machines. The Jsr223 compiles engines aren't even created at startup anymore if the environment variable compile-snippet-tests is set to false.
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.

compileAndLint is 2.5 times slower than lint
5 participants