-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (45 loc) · 1.48 KB
/
sonarcloud.yml
File metadata and controls
52 lines (45 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: SonarCloud analysis
on:
pull_request:
branches: ['main']
push:
branches: ['main']
workflow_dispatch:
permissions:
pull-requests: read
contents: read
jobs:
Analysis:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Verify SonarCloud Token
run: |
if [ -z "${{ secrets.SONAR_TOKEN }}" ]; then
echo "Error: SONAR_TOKEN is not set"
exit 1
fi
- name: SonarCloud Scan
uses: SonarSource/sonarqube-scan-action@v5.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.projectKey=dd3tech_dd360-components-docs
-Dsonar.organization=dd3tech-1
-Dsonar.projectName=dd360-components-docs -Dsonar.projectVersion=1.0
-Dsonar.sourceEncoding=UTF-8 -Dsonar.java.binaries=.
-Dsonar.java.jdkHome=$JAVA_HOME -Dsonar.verbose=true
-Dsonar.scanner.skipSystemTruststore=true -Dsonar.sources=.
-Dsonar.exclusions=**/node_modules/**,**/dist/**,**/coverage/**
-Dsonar.coverage.exclusions=**/node_modules/**,**/dist/**,**/coverage/**
-Dsonar.javascript.lcov.reportPaths=coverage/lcov.info