Use java version matrix in github actions

This commit is contained in:
Gabriele C 2022-04-10 20:25:31 +02:00 committed by GitHub
parent c32d090812
commit d166c951fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4,14 +4,16 @@ on: [push]
jobs: jobs:
build_and_test: build_and_test:
strategy:
matrix:
jdkversion: [8, 11, 17]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v3
- name: Set up JDK 1.8 - uses: actions/setup-java@v3
uses: actions/setup-java@v1
with: with:
java-version: 1.8 distribution: 'temurin'
java-version: ${{ matrix.jdkversion }}
cache: 'maven'
- name: Build with Maven - name: Build with Maven
run: mvn -B clean package --file pom.xml run: mvn -V -B clean package --file pom.xml