Added matrix for Java 11 & 15.
This commit is contained in:
parent
76113a3526
commit
022950b8d4
1 changed files with 13 additions and 5 deletions
18
.github/workflows/gradle.yml
vendored
18
.github/workflows/gradle.yml
vendored
|
@ -5,6 +5,12 @@ on: [push, pull_request, workflow_dispatch]
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
CI_NAME: "GitHub CI"
|
||||||
|
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-XX:MaxMetaspaceSize=512m"
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
java-version: [ 11, 15 ]
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
|
@ -12,7 +18,7 @@ jobs:
|
||||||
- name: Set up JDK 11
|
- name: Set up JDK 11
|
||||||
uses: actions/setup-java@v1
|
uses: actions/setup-java@v1
|
||||||
with:
|
with:
|
||||||
java-version: 11
|
java-version: ${{ matrix.java-version }}
|
||||||
- name: Grant execute permission for gradlew
|
- name: Grant execute permission for gradlew
|
||||||
run: chmod +x gradlew
|
run: chmod +x gradlew
|
||||||
- name: Cache SonarCloud packages
|
- name: Cache SonarCloud packages
|
||||||
|
@ -27,15 +33,17 @@ jobs:
|
||||||
path: |
|
path: |
|
||||||
~/.gradle/caches
|
~/.gradle/caches
|
||||||
~/.gradle/wrapper
|
~/.gradle/wrapper
|
||||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
key: ${{ runner.os }}-gradle-${{ matrix.java-version }}-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-gradle-
|
${{ runner.os }}-gradle-${{ matrix.java-version }}-
|
||||||
- name: Test with Gradle
|
- name: Test with Gradle
|
||||||
|
run: ./gradlew build check --stacktrace
|
||||||
|
- name: SonarCloud
|
||||||
|
if: matrix.java-version == '11'
|
||||||
env:
|
env:
|
||||||
CI_NAME: "GitHub CI"
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||||
run: ./gradlew check sonarqube
|
run: ./gradlew sonarqube
|
||||||
- name: Cleanup Gradle Cache
|
- name: Cleanup Gradle Cache
|
||||||
run: |
|
run: |
|
||||||
rm -f ~/.gradle/caches/modules-2/modules-2.lock
|
rm -f ~/.gradle/caches/modules-2/modules-2.lock
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue