File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 1+ name : SonarQube Analysis
2+
3+ on :
4+ push :
5+ branches :
6+ - main
7+ pull_request :
8+ types : [opened, synchronize, reopened]
9+
10+ jobs :
11+ sonarqube :
12+ name : SonarQube Scan
13+ runs-on : ubuntu-latest
14+
15+ steps :
16+ - uses : actions/checkout@v4
17+ with :
18+ fetch-depth : 0 # Shallow clones should be disabled for better analysis
19+
20+ - name : Setup Node.js
21+ uses : actions/setup-node@v4
22+ with :
23+ node-version : ' 20'
24+ cache : ' npm'
25+
26+ - name : Install dependencies
27+ run : npm ci
28+
29+ - name : SonarQube Scan
30+ uses : SonarSource/sonarqube-scan-action@master
31+ env :
32+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
33+ SONAR_HOST_URL : ${{ secrets.SONAR_HOST_URL }}
34+
35+ - name : SonarQube Quality Gate check
36+ id : sonarqube-quality-gate-check
37+ uses : sonarsource/sonarqube-quality-gate-action@master
38+ timeout-minutes : 5
39+ env :
40+ SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
41+ SONAR_HOST_URL : ${{ secrets.SONAR_HOST_URL }}
You can’t perform that action at this time.
0 commit comments