Skip to content

Commit

Permalink
fix(build): add missing acceptance tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Silthus committed Feb 19, 2022
1 parent 6823d17 commit 10e6ccd
Show file tree
Hide file tree
Showing 14 changed files with 55 additions and 45 deletions.
27 changes: 0 additions & 27 deletions acceptance/build.gradle

This file was deleted.

29 changes: 29 additions & 0 deletions acceptance/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
plugins {
id("schat.api")
id("se.thinkcode.cucumber-runner")
}

dependencies {
testImplementation(project(":schat-core"))
testImplementation(project(":schat-platform"))
testImplementation(project(":schat-ui"))
testImplementation(testFixtures(project(":schat-core")))
testImplementation(testFixtures(project(":schat-platform")))
testImplementation(testFixtures(project(":schat-ui")))

testImplementation(libs.junit.platform.suite)

testImplementation(libs.cucumber)
testImplementation(libs.cucumber.junit)
testImplementation(libs.cucumber.guice)

testImplementation(libs.javax.inject)
testImplementation(libs.guice)
}

cucumber {
main = "io.cucumber.core.cli.Main"
featurePath = "$rootDir/acceptance/src/test/resources/features"
glue = "classpath:net.silthus.schat.cucumber"
plugin = arrayOf("pretty", "json:$rootDir/acceptance/build/reports/cucumber-report.json")
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

package net.silthus.schat.cucumber;

import io.cucumber.java.ParameterType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

package net.silthus.schat.cucumber;

import io.cucumber.java.ParameterType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

package net.silthus.schat.cucumber;

import io.cucumber.guice.ScenarioScoped;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

package net.silthus.schat.cucumber;

import org.junit.platform.suite.api.ConfigurationParameter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

package net.silthus.schat.cucumber;

import io.cucumber.java.ParameterType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

package net.silthus.schat.cucumber;

import io.cucumber.java.DataTableType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

package net.silthus.schat.cucumber.models;

import lombok.Getter;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/

package net.silthus.schat.cucumber.models;

import java.util.UUID;
Expand Down
3 changes: 2 additions & 1 deletion bom/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ dependencies {
"platform",
"bukkit",
"velocity",
"bungeecord"
"bungeecord",
"acceptance"
).forEach {
api(project(":schat-$it"))
}
Expand Down
1 change: 1 addition & 0 deletions build-logic/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ dependencies {
implementation(libs.gradle.plugin.testlog)
implementation(libs.gradle.plugin.lombok)
implementation(libs.gradle.plugin.shadow)
implementation(libs.gradle.plugin.cucumber)

implementation(files(libs.javaClass.protectionDomain.codeSource.location))
}
13 changes: 13 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ gradle-plugin-indra = "2.1.1"
gradle-plugin-testlog = "3.1.0"
gradle-plugin-lombok = "6.4.1"
gradle-plugin-shadow = "7.1.2"
gradle-plugin-cucumber = "0.0.10"

checkstyle-plugin-stylecheck = "0.1"

Expand All @@ -16,8 +17,10 @@ mockbukkit = "1.15.5"

checkerframework = "3.21.2"
junit-jupiter = "5.8.1"
junit-platform = "1.8.2"
assertj = "3.21.0"
mockito = "4.0.0"
cucumber = "7.2.3"

event-api = "3.0.0"
adventure-api = "4.10.0-SNAPSHOT"
Expand All @@ -26,6 +29,7 @@ examination = "1.3.0"
configurate = "4.1.2"
cloud-commands = "1.6.1"
gson = "2.9.0"
guice = "5.1.0"

[libraries]
gradle-plugin-indra = { module = "net.kyori:indra-common", version.ref = "gradle-plugin-indra" }
Expand All @@ -34,15 +38,24 @@ gradle-plugin-indra-crossdoc = { module = "net.kyori:indra-crossdoc", version.re
gradle-plugin-testlog = { module = "com.adarshr:gradle-test-logger-plugin", version.ref = "gradle-plugin-testlog" }
gradle-plugin-lombok = { module = "io.freefair.gradle:lombok-plugin", version.ref = "gradle-plugin-lombok" }
gradle-plugin-shadow = { module = "gradle.plugin.com.github.johnrengelman:shadow", version.ref = "gradle-plugin-shadow" }
gradle-plugin-cucumber = { module = "se.thinkcode:gradle-cucumber-runner", version.ref = "gradle-plugin-cucumber" }

checkstyle-plugin-stylecheck = { module = "ca.stellardrift:stylecheck", version.ref = "checkstyle-plugin-stylecheck" }

junit-jupiter-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junit-jupiter" }
junit-jupiter-params = { module = "org.junit.jupiter:junit-jupiter-params", version.ref = "junit-jupiter" }
junit-jupiter-engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "junit-jupiter" }
junit-platform-suite = { module = "org.junit.platform:junit-platform-suite", version.ref = "junit-platform" }
assertj-core = { module = "org.assertj:assertj-core", version.ref = "assertj" }
mockito = { module = "org.mockito:mockito-junit-jupiter", version.ref = "mockito" }

cucumber = { module = "io.cucumber:cucumber-java", version.ref = "cucumber" }
cucumber-junit = { module = "io.cucumber:cucumber-junit-platform-engine", version.ref = "cucumber" }
cucumber-guice = { module = "io.cucumber:cucumber-guice", version.ref = "cucumber" }

guice = { module = "com.google.inject:guice", version.ref = "guice" }
javax-inject = { module = "javax.inject:javax.inject", version = "1" }

papermc = { module = "io.papermc.paper:paper-api", version.ref = "minecraft" }
spigot = { module = "org.spigotmc:spigot-api", version.ref = "minecraft" }
bungeecord = { module = "net.md-5:bungeecord-api", version.ref = "bungeecord" }
Expand Down
19 changes: 10 additions & 9 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@ pluginManagement {

rootProject.name = "sChat"

moonshineProject("bom")
moonshineProject("core")
moonshineProject("features")
moonshineProject("ui")
moonshineProject("platform")
moonshineProject("bukkit")
moonshineProject("velocity")
moonshineProject("bungeecord")
sChatProject("bom")
sChatProject("core")
sChatProject("features")
sChatProject("ui")
sChatProject("platform")
sChatProject("bukkit")
sChatProject("velocity")
sChatProject("bungeecord")
sChatProject("acceptance")

fun moonshineProject(path: String, name: String = "schat-$path"): ProjectDescriptor {
fun sChatProject(path: String, name: String = "schat-$path"): ProjectDescriptor {
include(path)
val project = project(":$path")
project.name = name
Expand Down

0 comments on commit 10e6ccd

Please sign in to comment.