Add OS matrix to test the project and examples on Ubuntu, Windows and macOS

This commit is contained in:
Erik C. Thauvin 2025-03-24 01:44:39 -07:00
parent 30f92d1262
commit 7d5b50641c
Signed by: erik
GPG key ID: 776702A6A2DA330E
3 changed files with 25 additions and 12 deletions

View file

@ -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();
}

View file

@ -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"));