-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (44 loc) · 1.47 KB
/
sonarcloud.yml
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
name: SonarCloud project analysis
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
schedule:
- cron: "1 1 2 * *"
permissions:
pull-requests: read # allows SonarCloud to decorate PRs with analysis results
jobs:
Analysis:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Test and Build
run: make build
- name: Run Tests
run: make test
- name: Analyze project with SonarCloud
# You can pin the exact commit or the version.
# uses: SonarSource/sonarcloud-github-action@de2e56b42aa84d0b1c5b622644ac17e505c9a049
uses: SonarSource/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
# Additional arguments for the sonarcloud scanner
args:
-Dsonar.tests=.
-Dsonar.projectBaseDir=.
-Dsonar.sources=.
-Dsonar.projectKey=jimmystewpot_dns-preload
-Dsonar.organization=jimmystewpot
-Dsonar.go.tests.reportPaths=reports/testreport.json
-Dsonar.go.coverage.reportPaths=reports/coverage.txt
-Dsonar.go.golint.reportPaths=reports/checkstyle-lint.xml
-Dsonar.test.inclusions=**/*_test.go
-Dsonar.scm.disabled
-Dsonar.sourceEncoding=UTF-8
-Dsonar.verbose=true