mirror of
https://github.com/darksaid98/Carbon.git
synced 2026-12-04 06:28:53 +00:00
Add smoke test for SQL migrations and Paper startup (#654)
In the future we may want to use a matrix and test other platforms related: #652, #653
This commit is contained in:
1 parent
d516736d21
commit
b820439d46
4 files changed
+117
-2
No files matched your search
@@ -66,6 +66,23 @@ tasks {
|
||||
github("MiniPlaceholders", "PlaceholderAPI-Expansion", "1.2.0", "PlaceholderAPI-Expansion-1.2.0.jar")
|
||||
hangar("PlaceholderAPI", libs.versions.placeholderapi.get())
|
||||
}
|
||||
providers.gradleProperty("smokeTest").map { it.toBoolean() }.getOrElse(false).let { smokeTest ->
|
||||
if (smokeTest) {
|
||||
runDirectory.set(layout.buildDirectory.dir("tmp/smokeTest"))
|
||||
doFirst {
|
||||
runDirectory.get().file("carbonchat-smoketest").asFile.takeIf { it.exists() }?.delete()
|
||||
runDirectory.get().file("eula.txt").asFile.also { it.parentFile.mkdirs() }.writeText("eula=true")
|
||||
}
|
||||
doLast {
|
||||
val pass = runDirectory.get().file("carbonchat-smoketest").asFile.exists()
|
||||
if (!pass) {
|
||||
throw GradleException("Smoke test failed, please check the logs.")
|
||||
}
|
||||
}
|
||||
systemProperty("carbonchat.smokeTest", true)
|
||||
systemProperty("carbonchat.smokeTestMode", providers.gradleProperty("smokeTestMode").getOrElse("h2"))
|
||||
}
|
||||
}
|
||||
}
|
||||
register<RunServer>("runServer2") {
|
||||
pluginJars.from(shadowJar.flatMap { it.archiveFile })
|
||||
|
||||
Reference in new issue
Block a user