Update build.yml

This commit is contained in:
tastybento 2020-11-08 15:35:38 -08:00 committed by GitHub
parent 2c1d1b1604
commit 2be4cb9e2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 4 deletions

View File

@ -13,10 +13,10 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up JDK 11
- name: Set up JDK 8
uses: actions/setup-java@v1
with:
java-version: 11
java-version: 8
- name: Cache SonarCloud packages
uses: actions/cache@v1
with:
@ -29,7 +29,13 @@ jobs:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
- name: Build and analyze
- name: Build
run: mvn clean org.jacoco:jacoco-maven-plugin:prepare-agent install
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Analyze
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
@ -39,4 +45,4 @@ jobs:
uses: actions/upload-artifact@v2
with:
name: Package
path: staging
path: staging