diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 82eac9f9..409947d3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,6 +2,7 @@ image: frekele/java stages: - build + - test - deploy before_script: @@ -32,6 +33,10 @@ build: - ServerWrapper/*.jar - modules/*.jar expire_in: 1 week +test: + stage: test + script: + - ./gradlew check after_script: - echo "End CI" diff --git a/LauncherTest/build.gradle b/LauncherTest/build.gradle deleted file mode 100644 index 69d74888..00000000 --- a/LauncherTest/build.gradle +++ /dev/null @@ -1,6 +0,0 @@ -apply from: 'test_support.gradle' - -dependencies { - compile project(':LaunchServer') -} - diff --git a/LauncherTest/src/main/java/pro/gravit/launcher/test/utils/EXENonWarningLauncherBinary.java b/LauncherTest/src/main/java/pro/gravit/launcher/test/utils/EXENonWarningLauncherBinary.java deleted file mode 100644 index 53867cda..00000000 --- a/LauncherTest/src/main/java/pro/gravit/launcher/test/utils/EXENonWarningLauncherBinary.java +++ /dev/null @@ -1,23 +0,0 @@ -package pro.gravit.launcher.test.utils; - -import java.io.IOException; -import java.nio.file.Files; - -import pro.gravit.launchserver.LaunchServer; -import pro.gravit.launchserver.binary.LauncherBinary; -import pro.gravit.utils.helper.IOHelper; - -public class EXENonWarningLauncherBinary extends LauncherBinary { - - public EXENonWarningLauncherBinary(LaunchServer server) { - super(server, server.dir.resolve(server.config.binaryName + ".exe")); - } - - @Override - public void build() throws IOException { - if (IOHelper.isFile(syncBinaryFile)) { - Files.delete(syncBinaryFile); - } - } - -} diff --git a/LauncherTest/src/test/java/pro/gravit/launcher/StartTest.java b/LauncherTest/src/test/java/pro/gravit/launcher/StartTest.java deleted file mode 100644 index 739f6479..00000000 --- a/LauncherTest/src/test/java/pro/gravit/launcher/StartTest.java +++ /dev/null @@ -1,36 +0,0 @@ -package pro.gravit.launcher; - -import java.io.IOException; -import java.nio.file.Path; -import java.security.spec.InvalidKeySpecException; - -import org.junit.jupiter.api.BeforeAll; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.io.TempDir; - -import pro.gravit.launcher.test.utils.EXENonWarningLauncherBinary; -import pro.gravit.launchserver.LaunchServer; -import pro.gravit.utils.helper.LogHelper; - -public class StartTest { - @TempDir - public Path dir; - - @BeforeAll - public static void prepare() { - LogHelper.removeStdOutput(); - LaunchServer.defaultLauncherEXEBinaryClass = EXENonWarningLauncherBinary.class; - } - - @Test - public void checkLaunchServerStarts() { - /*try { - LaunchServer srv = new LaunchServer(dir, true, new String[]{"checkInstall"}); - srv.run(); - srv.commandHandler.eval(new String[]{"checkInstall"}, false); - srv.close(); - } catch (InvalidKeySpecException | IOException e) { - throw new RuntimeException(e); - }*/ - } -} diff --git a/LauncherTest/test_support.gradle b/LauncherTest/test_support.gradle deleted file mode 100644 index dd1b9319..00000000 --- a/LauncherTest/test_support.gradle +++ /dev/null @@ -1,11 +0,0 @@ -dependencies { - testCompile 'org.junit.jupiter:junit-jupiter:5.4.1' -} - -test { - useJUnitPlatform() - testLogging { - events "passed", "skipped", "failed" - } -} - diff --git a/settings.gradle b/settings.gradle index f88da384..ca469385 100644 --- a/settings.gradle +++ b/settings.gradle @@ -7,7 +7,6 @@ include 'ServerWrapper' include 'LaunchServer' include 'LaunchServerConsole' -include 'LauncherTest' include 'modules' file('modules').eachDir { sub -> if (sub.name.endsWith('_module') || sub.name.endsWith('_swmodule') || sub.name.endsWith('_lmodule')) include 'modules:' + sub.name