casid / jte

Secure and speedy templates for Java and Kotlin.
https://jte.gg
Apache License 2.0
754 stars 56 forks source link

Support Gradle configuration cache. #207

Closed edward3h closed 1 year ago

edward3h commented 1 year ago

Fix issues related to Gradle configuration cache. #204

Add gradle-test-wrapper to support running Gradle tests against multiple Gradle versions.

codecov[bot] commented 1 year ago

Codecov Report

Patch and project coverage have no change.

Comparison is base (ca786ea) 93.03% compared to head (5026e0b) 93.03%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #207 +/- ## ========================================= Coverage 93.03% 93.03% Complexity 1127 1127 ========================================= Files 63 63 Lines 2886 2886 Branches 465 465 ========================================= Hits 2685 2685 Misses 109 109 Partials 92 92 ``` Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Andreas+Hager). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Andreas+Hager)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

casid commented 1 year ago

Thanks @edward3h!

This looks good and I would like to merge it, but the build got a lot slower.

Build with maven: 3-5 min (unchanged and unrelated. I'd still like to have this within 1 minute, but most of the time is eaten by the slow Kotlin compiler) Run all the Gradle Plugin tests: 16-25 min (this seems quite slow, essentially the tests don't do much at all, I'd expect each to be done within a few seconds)

I feel we should try to speed up the Gradle tests before merging. Do you have an idea what could cause the slowdown?

edward3h commented 1 year ago

I made it run each test multiple times with different Gradle versions. I'll add a property to control that. I'm also not sure if running with TestKit added overhead. I'll take a look at timing.

edward3h commented 1 year ago

As a guess it was downloading and installing each gradle version in the CI build. I'm making it default to just running with the current version.

casid commented 1 year ago

Oh wow, that's much faster now! Thanks for looking into it, and also for contributing the Gradle configuration cache support.