Add OS matrix to test the project and examples on Ubuntu, Windows and macOS
This commit is contained in:
parent
30f92d1262
commit
7d5b50641c
3 changed files with 25 additions and 12 deletions
|
@ -23,6 +23,7 @@ import rife.bld.publish.PublishLicense;
|
|||
import rife.bld.publish.PublishScm;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
|
||||
import static rife.bld.dependencies.Repository.*;
|
||||
import static rife.bld.dependencies.Scope.compile;
|
||||
|
@ -97,10 +98,13 @@ public class DetektOperationBuild extends Project {
|
|||
|
||||
@Override
|
||||
public void test() throws Exception {
|
||||
new ExecOperation()
|
||||
.fromProject(this)
|
||||
.command("scripts/cliargs.sh")
|
||||
.execute();
|
||||
var os = System.getProperty("os.name");
|
||||
if (os != null && os.toLowerCase(Locale.US).contains("linux")) {
|
||||
new ExecOperation()
|
||||
.fromProject(this)
|
||||
.command("scripts/cliargs.sh")
|
||||
.execute();
|
||||
}
|
||||
super.test();
|
||||
}
|
||||
|
||||
|
|
|
@ -19,6 +19,8 @@ package rife.bld.extension;
|
|||
import org.assertj.core.api.AutoCloseableSoftAssertions;
|
||||
import org.junit.jupiter.api.BeforeAll;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.condition.EnabledOnOs;
|
||||
import org.junit.jupiter.api.condition.OS;
|
||||
import rife.bld.BaseProject;
|
||||
import rife.bld.blueprints.BaseProjectBlueprint;
|
||||
import rife.bld.extension.detekt.Report;
|
||||
|
@ -92,6 +94,7 @@ class DetektOperationTest {
|
|||
}
|
||||
|
||||
@Test
|
||||
@EnabledOnOs(OS.LINUX)
|
||||
@SuppressWarnings("PMD.AvoidInstantiatingObjectsInLoops")
|
||||
void testCheckAllParameters() throws IOException {
|
||||
var args = Files.readAllLines(Paths.get("src", "test", "resources", "detekt-args.txt"));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue