This repository has been archived by the owner on Sep 25, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a630519
commit ade9308
Showing
3 changed files
with
36 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,54 @@ | ||
# Default build validation "clean verify" for non-experimental branches | ||
# Build validation | ||
|
||
name: Build | ||
|
||
on: | ||
push: | ||
branches-ignore: | ||
- 'experimental/**' | ||
- experimental/** | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
branches-ignore: | ||
- 'experimental/**' | ||
- experimental/** | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
java: [8, 11] | ||
os: [ubuntu-latest] | ||
distribution: [temurin] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | ||
|
||
- name: Setup JDK | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: temurin | ||
java-version: 8 | ||
distribution: ${{ matrix.distribution }} | ||
java-version: ${{ matrix.java }} | ||
cache: 'maven' | ||
|
||
- name: Build and verify | ||
- name: Cache SonarCloud packages | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/.sonar/cache | ||
key: ${{ runner.os }}-sonar | ||
restore-keys: ${{ runner.os }}-sonar | ||
|
||
- name: Build and verify (with SonarCloud) | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | ||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | ||
run: mvn -s ./.maven-settings.xml -B -U clean verify sonar:sonar -Dsonar.projectKey=${{github.repository_owner}}_${{github.event.repository.name}} -Dsonar.projectName=${{github.event.repository.name}} | ||
if: ${{ matrix.java == '11' && matrix.os == 'ubuntu-latest' }} | ||
|
||
- name: Build and verify (without SonarCloud) | ||
run: mvn -s ./.maven-settings.xml -B -U clean verify | ||
if: ${{ matrix.java != '11' || matrix.os != 'ubuntu-latest' }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters