[20.x] Fix #315 logger framework incompatibility #939
Workflow file for this run
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 workflow will build a Java project with Maven | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven | |
name: Build | |
on: | |
push: | |
branches: | |
- '**' | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
SONAR_ORGANIZATION: ${{ secrets.SONAR_ORGANIZATION }} | |
SONAR_PROJECT_KEY: ${{ secrets.SONAR_PROJECT_KEY}} | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: 'temurin' | |
- name: Cache SonarCloud packages | |
uses: actions/cache@v4 | |
if: ${{ env.SONAR_TOKEN != 0 }} | |
with: | |
path: ~/.sonar/cache | |
key: ${{ runner.os }}-sonar | |
restore-keys: ${{ runner.os }}-sonar | |
- name: Cache Maven packages | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2 | |
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} | |
restore-keys: ${{ runner.os }}-m2 | |
- name: Maven install (skip test) | |
run: mvn install -DskipTests=true -B -V -Psource-quality | |
- name: Maven test + SonarCloud | |
if: ${{ env.SONAR_TOKEN != 0 }} | |
run: mvn -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar | |
-Dsonar.java.source=17 | |
-Dsonar.projectKey=${{ env.SONAR_PROJECT_KEY }} | |
-Dsonar.organization=${{ env.SONAR_ORGANIZATION }} | |
-Dsonar.host.url=https://sonarcloud.io | |
- name: Maven test no SonarCloud | |
if: ${{ env.SONAR_TOKEN == 0 }} | |
run: mvn -B verify | |
- name: Upload surefire test results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Surefire-Test-Results | |
path: ~/**/surefire-reports/**/*.txt |