-
Notifications
You must be signed in to change notification settings - Fork 16
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
Make UI test results properly cacheable in the CI #950
Conversation
b38f636
to
6aacf96
Compare
# language=sh | ||
command: | | ||
./gradlew test | ||
# TODO (JetBrains/gradle-intellij-plugin#1039): during tests, classpath.index file is created by com.intellij.util.lang.PathClassLoader |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good Tzar Gradle, bad boyars plugins
.circleci/config.yml
Outdated
@@ -28,12 +28,12 @@ jobs: | |||
keys: | |||
# First, try finding a cache entry with the same set of libraries | |||
# that also comes from the same branch (so as to make the best use of Gradle compilation cache). | |||
- gradle-deps-v5-{{ checksum "gradle/libs.versions.toml" }}-{{ .Branch }} | |||
- gradle-deps-v22-{{ checksum "gradle/libs.versions.toml" }}-{{ .Branch }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:ups:
@@ -0,0 +1,58 @@ | |||
apply plugin: 'org.gradle.scala' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is adapted with some changes from the deleted fragment of build.gradle
|
||
dependencies { | ||
// Needed so that the main classpath of the plugin is considered by Gradle as an input to `uiTest` task. | ||
// Otherwise, changes in the plugin would NOT cause the UI tests to be re-executed when caching is enabled. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the new addition. Previously, UI tests resided in root project, so they depended on src/main
code of root project anyway. Now they're in a subproject... so I needed to add this atypical construct (subproject depending on root project, not the other way round)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This entire extraction to a separate subproject was needed as fix (workaround, kinda, again...) for #945
6aacf96
to
00c034e
Compare
…re only IntelliJ *dependencies* are needed
c9ae6b6
to
984a39d
Compare
Meh this is hopeless, too much complication in Gradle config for too little benefit, closing This solution is far from complete, it turned out that the current setup has a side effect of messing up with
into a simple default:
when |
Now if there's no change in production code, or UI tests (so e.g. just tests or CI config or build config changed but with no change to the published plugin itself), then UI tests are not being rerun in the CI.
Here are the build times (with binary compatibility check aka
./gradlew runPluginVerifier
skipped, coz it's uncacheable as for now):☝🏻 16 minutes is to build from scratch, 2:30 to rerun when nothing changed in the plugin.
Used to be like 8-10 minutes to rerun coz UI tests were always re-executed, caching didn't work :/
This PR includes both a fix for #945 and a completely unrelated workaround for JetBrains/intellij-platform-gradle-plugin#1039 (which won't be needed soon once a fix to gradle-intellij-plugin is released).