diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..cb2cb21 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,35 @@ +name: CI + +on: + pull_request: + branches: [ master, main ] + push: + branches: [ master, main ] + +jobs: + test: + name: Run Tests + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up JDK 25 + uses: actions/setup-java@v4 + with: + java-version: '25' + distribution: 'temurin' + cache: maven + + - name: Build and Test + run: mvn -B verify --file pom.xml + + - name: Upload Test Results + if: always() + uses: actions/upload-artifact@v4 + with: + name: test-results + path: target/surefire-reports/ + retention-days: 7 + diff --git a/.java-version b/.java-version index d3bdbdf..7273c0f 100644 --- a/.java-version +++ b/.java-version @@ -1 +1 @@ -1.7 +25 diff --git a/pom.xml b/pom.xml index e3c1370..acc88c0 100644 --- a/pom.xml +++ b/pom.xml @@ -41,10 +41,10 @@ org.apache.maven.plugins maven-compiler-plugin - 3.1 + 3.14.1 - 1.6 - 1.6 + 8 + 8 diff --git a/src/test/java/io/gsonfire/gson/HooksTest.java b/src/test/java/io/gsonfire/gson/HooksTest.java index d6d2511..5d4a23f 100644 --- a/src/test/java/io/gsonfire/gson/HooksTest.java +++ b/src/test/java/io/gsonfire/gson/HooksTest.java @@ -115,10 +115,10 @@ public void postSerialize(JsonElement result, A src, Gson gson) { assertEquals(0, countWhenDeserialize.get()); } - private class A{ + private static class A{ private int count = 0; private transient int nonSerializable = -1; - private Gson gson; + private transient Gson gson; private A(int count) { this.count = count; @@ -154,7 +154,7 @@ public Gson getGson() { } } - private class B extends A { + private static class B extends A { public B b; private B(int count) {