Skip to content

Commit

Permalink
add sonarcloud integration via github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jimmystewpot committed Apr 5, 2024
1 parent 79b70e4 commit ea03f43
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 1 deletion.
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ jobs:
uses: actions/setup-go@v5
with:
go-version: stable
- run: make test-all
- name: Run GoReleaser Build
uses: goreleaser/goreleaser-action@v5
with:
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: SonarCloud
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: stable
- run: make test-all
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GORELEASER }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
13 changes: 13 additions & 0 deletions .sonarcloud.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
sonar.projectKey=jimmystewpot_in-addr
sonar.organization=jimmystewpot

# This is the name and version displayed in the SonarCloud UI.
sonar.projectName=in-addr
#sonar.projectVersion=1.0


# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
#sonar.sources=.

# Encoding of the source code. Default is default system encoding
sonar.sourceEncoding=UTF-8

0 comments on commit ea03f43

Please sign in to comment.