Update build for 2024.3 support #618
Workflow file for this run
This file contains hidden or 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
| name: SonarCloud | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| types: [ opened, synchronize, reopened ] | |
| jobs: | |
| sonarcloud: | |
| runs-on: ubuntu-latest | |
| env: | |
| SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
| steps: | |
| # Check out current repository | |
| - name: Fetch Sources | |
| uses: actions/checkout@v4 | |
| if: ${{ env.SONAR_TOKEN != null }} | |
| with: | |
| fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis | |
| # Validate wrapper | |
| - name: Gradle Wrapper Validation | |
| if: ${{ env.SONAR_TOKEN != null }} | |
| uses: gradle/actions/wrapper-validation@v4 | |
| # Set up Java environment for the next steps | |
| - name: Setup Java | |
| if: ${{ env.SONAR_TOKEN != null }} | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: zulu | |
| java-version: 21 | |
| # SonarCloud Cache | |
| - name: 'Cache: SonarCloud' | |
| if: ${{ env.SONAR_TOKEN != null }} | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.sonar/cache | |
| key: ${{ runner.os }}-sonar | |
| - name: Run sonarqube | |
| if: ${{ env.SONAR_TOKEN != null }} | |
| uses: gradle/gradle-build-action@v3 | |
| with: | |
| arguments: -Dtest.ignoreFailures=true sonarqube --info --stacktrace | |
| cache-read-only: ${{ github.ref != 'refs/heads/main' }} | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |