From b9df7855d396dbd3c5a8e770542954aeb189d9b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ciar=C3=A1n=20Ainsworth?= Date: Thu, 27 Nov 2025 03:27:49 +0100 Subject: [PATCH] Split up build and test for pull requests --- .github/workflows/{maven.yml => build.yml} | 4 +-- .github/workflows/test.yml | 29 ++++++++++++++++++++++ 2 files changed, 30 insertions(+), 3 deletions(-) rename .github/workflows/{maven.yml => build.yml} (92%) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/maven.yml b/.github/workflows/build.yml similarity index 92% rename from .github/workflows/maven.yml rename to .github/workflows/build.yml index 2669e09..3701321 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/build.yml @@ -6,13 +6,11 @@ # separate terms of service, privacy policy, and support # documentation. -name: Java CI with Maven +name: Java build with Maven on: push: branches: [ "main" ] - pull_request: - branches: [ "main" ] jobs: build: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..6a1c8a3 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,29 @@ +# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Java test with Maven + +on: + pull_request: + branches: [ "main" ] + +jobs: + test: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 25 + uses: actions/setup-java@v5 + with: + java-version: '25' + distribution: 'temurin' + cache: maven + - name: Build with Maven + run: mvn -B clean test --file pom.xml