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:
Jason Penilla authored and GitHub committed 2025-05-18 21:01:30 -07:00
1 parent d516736d21
commit b820439d46
4 files changed
+117 -2

No files matched your search

+17
View File
@@ -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 })