From 375eb4502b312fc6cc38ba1a5109cdc2fa3983b6 Mon Sep 17 00:00:00 2001 From: sggerard Date: Mon, 25 Nov 2024 15:56:59 -0800 Subject: [PATCH] Move sonar analysis to after tests run --- .github/workflows/analysis.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/analysis.yml b/.github/workflows/analysis.yml index ca7b70f..d8ef5ee 100644 --- a/.github/workflows/analysis.yml +++ b/.github/workflows/analysis.yml @@ -14,19 +14,6 @@ concurrency: cancel-in-progress: true jobs: - sonarcloud: - name: SonarQube Cloud - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis - - name: SonarQube Cloud Scan - uses: SonarSource/sonarcloud-github-action@master - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - tests: name: Tests if: ${{ ! github.event.pull_request.draft }} @@ -72,6 +59,19 @@ jobs: uses: github/codeql-action/upload-sarif@v3 with: sarif_file: "trivy-results.sarif" + + sonarcloud: + name: SonarQube Cloud + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: SonarQube Cloud Scan + uses: SonarSource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} results: name: Analysis Results