Added Github workflow martix for JDK 1.8, 11 & 15.

This commit is contained in:
Erik C. Thauvin 2021-05-31 11:55:18 -07:00
parent 022950b8d4
commit 4bf4a7ec09

View file

@ -6,8 +6,8 @@ jobs:
build:
runs-on: ubuntu-latest
env:
CI_NAME: "GitHub CI"
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-XX:MaxMetaspaceSize=512m"
SONAR_JDK: "11"
strategy:
matrix:
java-version: [ 11, 15 ]
@ -15,13 +15,14 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up JDK 11
- name: Set up JDK ${{ matrix.java-version }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java-version }}
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Cache SonarCloud packages
if: matrix.java-version == env.SONAR_JDK
uses: actions/cache@v1
with:
path: ~/.sonar/cache
@ -39,7 +40,7 @@ jobs:
- name: Test with Gradle
run: ./gradlew build check --stacktrace
- name: SonarCloud
if: matrix.java-version == '11'
if: success() && matrix.java-version == env.SONAR_JDK
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}