From ceff8a8684df9dc943010252ae93a7d9428a97c1 Mon Sep 17 00:00:00 2001 From: Gravit Date: Thu, 29 Aug 2019 16:46:52 +0700 Subject: [PATCH] =?UTF-8?q?[FEATURE]=20=D0=A3=D0=B4=D0=B0=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5=20=D0=BC=D1=83=D1=81=D0=BE=D1=80=D0=BD=D1=8B?= =?UTF-8?q?=D1=85=20=D1=84=D0=B0=D0=B9=D0=BB=D0=BE=D0=B2,=20=D1=82=D0=B5?= =?UTF-8?q?=D1=81=D1=82=D1=8B=20=D0=B2=20GitLab=20CI?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 5 +++ LauncherTest/build.gradle | 6 ---- .../utils/EXENonWarningLauncherBinary.java | 23 ------------ .../java/pro/gravit/launcher/StartTest.java | 36 ------------------- LauncherTest/test_support.gradle | 11 ------ settings.gradle | 1 - 6 files changed, 5 insertions(+), 77 deletions(-) delete mode 100644 LauncherTest/build.gradle delete mode 100644 LauncherTest/src/main/java/pro/gravit/launcher/test/utils/EXENonWarningLauncherBinary.java delete mode 100644 LauncherTest/src/test/java/pro/gravit/launcher/StartTest.java delete mode 100644 LauncherTest/test_support.gradle 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