Skip to content

Commit

Permalink
Move sonar analysis to after tests run
Browse files Browse the repository at this point in the history
  • Loading branch information
sggerard committed Nov 25, 2024
1 parent e93f229 commit 375eb45
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 375eb45

Please sign in to comment.