mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 03:31:15 +03:00
[FEATURE] Удаление мусорных файлов, тесты в GitLab CI
This commit is contained in:
parent
a09a7c8cf6
commit
ceff8a8684
6 changed files with 5 additions and 77 deletions
|
@ -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"
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
apply from: 'test_support.gradle'
|
||||
|
||||
dependencies {
|
||||
compile project(':LaunchServer')
|
||||
}
|
||||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -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);
|
||||
}*/
|
||||
}
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
dependencies {
|
||||
testCompile 'org.junit.jupiter:junit-jupiter:5.4.1'
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
testLogging {
|
||||
events "passed", "skipped", "failed"
|
||||
}
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue