# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Java CI with Maven

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  test_jdk8:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Set up JDK 1.8
      uses: actions/setup-java@v1
      with:
        java-version: 1.8
    - name: Build with Maven
      run: mvn -B package --file pom.xml

  test_jdk11:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Set up JDK 11
      uses: actions/setup-java@v1
      with:
        java-version: 1.11
    - name: Build with Maven
      run: mvn -B package --file pom.xml

  test_jdk14:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: Set up JDK 14
      uses: actions/setup-java@v1
      with:
        java-version: 1.14
    - name: Build with Maven
      run: mvn -B package --file pom.xml

# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Java CI with Maven

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

jobs:
  test:
    runs-on: ubuntu-latest
    strategy: 
      matrix:
        java: [ '8', '11', '13', '15', '17' ]
    name: Test on ${{ matrix.java }}
    steps:
    - uses: actions/checkout@v2
    - name: Set up JDK ${{ matrix.java }}
      uses: actions/setup-jdk@v2
      with:
        java-version: ${{ matrix.java }}
        architecture: x64
    - name: Build with Maven
      run: mvn -B package --file pom.xml

Update JDKs used for testing, switch to matrix-based testing action
Update JDKs used for testing, switch to matrix-based testing action
