From 942306bd0896d855c22f689a5da07eac6fcbd7de Mon Sep 17 00:00:00 2001 From: Marius Hanl Date: Sat, 11 Jul 2026 20:15:49 +0200 Subject: [PATCH] Add CI Pipeline --- .github/workflows/ci.yml | 29 +++++++++++++++++++ pom.xml | 27 ++++++++++++----- .../java/tools/maran/svgnode/SvgNodeTest.java | 12 ++++---- 3 files changed, 54 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..da1449f --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +name: Build & Test + +on: + push: + branches: + - master + pull_request: + types: [opened, synchronize, reopened] + +permissions: + contents: read + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up JDK 25 + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 25 + cache: maven + + - name: Build & Test (headless) + run: mvn -B verify diff --git a/pom.xml b/pom.xml index 41338b2..a0f8d96 100644 --- a/pom.xml +++ b/pom.xml @@ -61,6 +61,23 @@ + + org.apache.maven.plugins + maven-compiler-plugin + 3.15.0 + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.5.6 + + + --enable-native-access=javafx.graphics -XX:+UseCompactObjectHeaders --finalization=disabled + + + + org.apache.maven.plugins maven-source-plugin @@ -75,12 +92,6 @@ - - org.apache.maven.plugins - maven-compiler-plugin - 3.15.0 - - org.apache.maven.plugins maven-javadoc-plugin @@ -107,7 +118,7 @@ sign-artifacts - verify + deploy sign @@ -118,7 +129,7 @@ org.sonatype.central central-publishing-maven-plugin - 0.10.0 + 0.11.0 true central diff --git a/src/test/java/tools/maran/svgnode/SvgNodeTest.java b/src/test/java/tools/maran/svgnode/SvgNodeTest.java index dbceacc..7b9a472 100644 --- a/src/test/java/tools/maran/svgnode/SvgNodeTest.java +++ b/src/test/java/tools/maran/svgnode/SvgNodeTest.java @@ -299,12 +299,12 @@ private static void assertSvgDimensions(SvgNode node, double expectedWidth, doub svg.minHeight(-1), svg.prefHeight(-1), svg.maxHeight(-1) // height }; }); - assertEquals(expectedWidth, widthHeightDimensions[0], 1, "svg minWidth"); - assertEquals(expectedWidth, widthHeightDimensions[1], 1, "svg prefWidth"); - assertEquals(expectedWidth, widthHeightDimensions[2], 1, "svg maxWidth"); - assertEquals(expectedHeight, widthHeightDimensions[3], 1, "svg minHeight"); - assertEquals(expectedHeight, widthHeightDimensions[4], 1, "svg prefHeight"); - assertEquals(expectedHeight, widthHeightDimensions[5], 1, "svg maxHeight"); + assertEquals(expectedWidth, widthHeightDimensions[0], EPS, "svg minWidth"); + assertEquals(expectedWidth, widthHeightDimensions[1], EPS, "svg prefWidth"); + assertEquals(expectedWidth, widthHeightDimensions[2], EPS, "svg maxWidth"); + assertEquals(expectedHeight, widthHeightDimensions[3], EPS, "svg minHeight"); + assertEquals(expectedHeight, widthHeightDimensions[4], EPS, "svg prefHeight"); + assertEquals(expectedHeight, widthHeightDimensions[5], EPS, "svg maxHeight"); } private static Scene createScene(SvgNode node) {