Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions .github/workflows/BuildApp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Build And Test
shell: bash
run: |
go test -cover ./internal/... -covermode=atomic -coverprofile=coverage.out
go test -short -cover ./internal/... -coverprofile=coverage.out

- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
Expand All @@ -42,14 +42,10 @@ jobs:
with:
projectBaseDir: ./
args: >
-Dsonar.organization=pangolin-golang
-Dsonar.projectKey=pangolin-do-golang_tech-challenge-cart-api
-Dsonar.projectVersion=${{ env.SHA }}
-Dsonar.language=go
-Dsonar.qualitygate.wait=true
-Dsonar.tests=internal/
-Dsonar.go.coverage.reportPaths=coverage.out
-Dsonar.verbose=true


- name: Login to GitHub Container Registry
uses: docker/login-action@v3
Expand Down
13 changes: 13 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Github organization linked to sonarcloud
sonar.organization=pangolin-golang

# Project key from sonarcloud dashboard for Github Action,
# otherwise pick a project key you like
sonar.projectKey=pangolin-do-golang_tech-challenge-cart-api

sonar.projectName=tech-challenge-cart-api

sonar.exclusions=**/mocks/**,**/deploy/**,**/docs/**,**/cmd/**

sonar.test.inclusions=**/*_test.go
sonar.go.coverage.reportPaths=/github/workspace/coverage.out
Loading