From ed39690daa9425a484d9e011d83d419636427663 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20L=C3=B6vdahl?= Date: Fri, 26 Jan 2024 12:27:55 +0200 Subject: [PATCH] Run GitHub actions on PRs and merge all workflows to one file --- .github/workflows/maven-11.yml | 17 ----------------- .github/workflows/maven-13.yml | 17 ----------------- .github/workflows/maven.yml | 27 ++++++++++++++++++++------- 3 files changed, 20 insertions(+), 41 deletions(-) delete mode 100644 .github/workflows/maven-11.yml delete mode 100644 .github/workflows/maven-13.yml diff --git a/.github/workflows/maven-11.yml b/.github/workflows/maven-11.yml deleted file mode 100644 index dc33dfb46..000000000 --- a/.github/workflows/maven-11.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: JDK11 - -on: [push] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v1 - - name: Set up JDK 11 - uses: actions/setup-java@v1 - with: - java-version: 11 - - name: Build with Maven - run: mvn -B package --file pom.xml diff --git a/.github/workflows/maven-13.yml b/.github/workflows/maven-13.yml deleted file mode 100644 index da93848de..000000000 --- a/.github/workflows/maven-13.yml +++ /dev/null @@ -1,17 +0,0 @@ -name: JDK13 - -on: [push] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v1 - - name: Set up JDK 13 - uses: actions/setup-java@v1 - with: - java-version: 13 - - name: Build with Maven - run: mvn -B package --file pom.xml diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 439011b8e..309479747 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -1,17 +1,30 @@ -name: jdk8 +name: Java tests -on: [push] +on: + push: + pull_request: jobs: build: - runs-on: ubuntu-latest + strategy: + matrix: + java: + - '8' + - '11' + - '17' + + name: Java ${{ matrix.java }} steps: - - uses: actions/checkout@v1 - - name: Set up JDK 1.8 - uses: actions/setup-java@v1 + - uses: actions/checkout@v3 + + - name: Set up Eclipse Temurin ${{ matrix.java }} + uses: actions/setup-java@v4 with: - java-version: 1.8 + distribution: temurin + java-version: ${{ matrix.java }} + cache: 'maven' + - name: Build with Maven run: mvn -B package --file pom.xml