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

Update 'all tests' GitHub action, enable Gradle Build Cache #862

Merged
merged 8 commits into from Jul 26, 2022

Conversation

aSemy
Copy link
Contributor

@aSemy aSemy commented Jul 25, 2022

This PR contains some proposals for improving the 'all tests' GitHub action. I hope to make them faster.

I'm making a PR before an issue to test/demo that it works as intended :)

  • Only test LTS JDK versions (11, 17), plus the latest version (18 at the moment - this can change more frequently). I'm making an assumption here that there's not going to be major differences between the non-LTS versions, and even if there are, as far as I know they're not well supported.

    Reducing the number of versions improves the actions speed, as I think there's a limit on how many jobs can run in parallel.

  • Add 'concurrency'. I've noticed when I've pushed a few changes in rapid succession, each change will be tested. This isn't necessary - the tests should be cancelled and restarted if there's a newer commit.

    I copied the concurrency config from here: https://docs.github.com/en/actions/examples/using-concurrency-expressions-and-a-test-matrix#understanding-the-example

  • I bumped Kotlin 1.6.0 to 1.6.21. It seemed odd that 1.5 and 1.7 were on the latest version, but 1.6 wasn't.

  • I updated the Gradle caching, copied from

    https://github.com/JetBrains/intellij-platform-plugin-template/actions/runs/242898088/workflow#L46-L58

    This means the cache key is less specific (I think sharing the Gradle cache between Kotlin & JVM versions is fine, Gradle will rebuild/reuse tasks if necessary), and the wrapper and dependencies are cached separately (if the dependencies change, the wrapper can still be cached)

  • I enabled Gradle Build cache. This should really help build speeds.

@aSemy aSemy changed the title Update 'all tests' GitHub action Update 'all tests' GitHub action, enable Gradle Build Cache Jul 25, 2022
@Raibaz
Copy link
Collaborator

Raibaz commented Jul 26, 2022

This is awesome, thanks so much!

@Raibaz Raibaz merged commit 92893ca into mockk:master Jul 26, 2022
20 checks passed
@aSemy aSemy deleted the update-github-action-all-tests branch Aug 12, 2022
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.

None yet

2 participants