Skip to content

Commit 375eb45

Browse files
committed
Move sonar analysis to after tests run
1 parent e93f229 commit 375eb45

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

.github/workflows/analysis.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,6 @@ concurrency:
1414
cancel-in-progress: true
1515

1616
jobs:
17-
sonarcloud:
18-
name: SonarQube Cloud
19-
runs-on: ubuntu-latest
20-
steps:
21-
- uses: actions/checkout@v4
22-
with:
23-
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
24-
- name: SonarQube Cloud Scan
25-
uses: SonarSource/sonarcloud-github-action@master
26-
env:
27-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
28-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
29-
3017
tests:
3118
name: Tests
3219
if: ${{ ! github.event.pull_request.draft }}
@@ -72,6 +59,19 @@ jobs:
7259
uses: github/codeql-action/upload-sarif@v3
7360
with:
7461
sarif_file: "trivy-results.sarif"
62+
63+
sonarcloud:
64+
name: SonarQube Cloud
65+
runs-on: ubuntu-latest
66+
steps:
67+
- uses: actions/checkout@v4
68+
with:
69+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
70+
- name: SonarQube Cloud Scan
71+
uses: SonarSource/sonarcloud-github-action@master
72+
env:
73+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
74+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
7575

7676
results:
7777
name: Analysis Results

0 commit comments

Comments
 (0)