mirror of
https://github.com/gradle/gradle-build-action.git
synced 2025-06-06 08:16:11 +02:00
Test config-cache support for multiple builds in one job
This commit is contained in:
parent
887e1a09ab
commit
69aad1f173
2 changed files with 37 additions and 1 deletions
|
@ -16,3 +16,15 @@ dependencies {
|
|||
tasks.test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
tasks.named("test").configure {
|
||||
// Use an environment variable to bypass config-cache checks
|
||||
if (System.getenv("VERIFY_CACHED_CONFIGURATION") != null) {
|
||||
throw RuntimeException("Configuration was not cached: unexpected configuration of test task")
|
||||
}
|
||||
doLast {
|
||||
if (System.getProperties().containsKey("verifyCachedBuild")) {
|
||||
throw RuntimeException("Build was not cached: unexpected execution of test task")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue