From 3b2fd8530600183996d2bd676ec25631318b6b83 Mon Sep 17 00:00:00 2001 From: Tamas Cservenak Date: Sun, 12 Nov 2023 23:12:54 +0100 Subject: [PATCH] Update workflow --- .github/workflows/ci.yml | 44 ++++++++++++++++++++++++++-------------- 1 file changed, 29 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bf706f5..078c962 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,29 +1,43 @@ name: Verify -on: [workflow_call] +inputs: + jdk-matrix: + description: jdk matrix as json array + required: false + default: '[ 8, 11, 17, 21 ]' -jobs: - setup: - runs-on: ubuntu-latest - steps: - - name: Stop old builds - if: github.ref != 'refs/heads/master' - uses: styfle/cancel-workflow-action@0.11.0 - with: - access_token: ${{ github.token }} +on: + push: + branches: + - master + pull_request: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: build: - needs: setup + name: Build and Test on JDK ${{ matrix.java }} + runs-on: ubuntu-latest strategy: matrix: - java: [ 11, 17 ] - runs-on: ubuntu-latest + java: ${{ fromJSON( inputs.jdk-matrix ) }} + fail-fast: false + steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 + with: + persist-credentials: false + submodules: false + show-progress: false + - name: "Set up JDK ${{ matrix.java }}" uses: actions/setup-java@v3 with: java-version: ${{ matrix.java }} distribution: 'temurin' + - name: Build & Test - run: ./mvnw -B verify + run: ./mvnw -B verify -P run-its +