Skip to content

Commit

Permalink
ci: make sonarcloud more quiet (backport cosmos#14585) (cosmos#14589)
Browse files Browse the repository at this point in the history
Co-authored-by: Julien Robert <[email protected]>
  • Loading branch information
mergify[bot] and julienrbrt authored Jan 12, 2023
1 parent e9fe7ec commit 089e647
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 31 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ jobs:
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_CLIENT_V2 }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: client/v2/

Expand Down Expand Up @@ -301,7 +301,7 @@ jobs:
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_CORE }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: core/

Expand Down Expand Up @@ -331,7 +331,7 @@ jobs:
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_DEPINJECT }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

test-errors:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -359,7 +359,7 @@ jobs:
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_ERRORS }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: errors/

Expand Down Expand Up @@ -389,7 +389,7 @@ jobs:
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_MATH }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: math/

Expand Down Expand Up @@ -424,7 +424,7 @@ jobs:
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_SIMAPP }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: simapp/

Expand Down Expand Up @@ -454,7 +454,7 @@ jobs:
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_TX }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: tx/

Expand Down Expand Up @@ -488,7 +488,7 @@ jobs:
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_ROSETTA }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: tools/rosetta/

Expand Down Expand Up @@ -518,6 +518,6 @@ jobs:
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN_COSMOVISOR }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: tools/cosmovisor/
5 changes: 3 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,13 @@ For consistency between our CI and the local tests, `GOWORK=off` is set in the `

When extracting a package to its own go modules, some extra steps are required, for keeping our CI checks and Dev UX:

* Add a CHANGELOG.md / README.md under the new package folder
* Add the package in [`go.work.example`](./go.work.example)
* Add weekly dependabot checks (see [dependabot.yml](./.github/dependabot.yml))
* Pre-configure SonarCloud
* Add tests to github workflow [test.yml](.github/workflows/test.yml) (under submodules)
* Configure SonarCloud
* Add `sonar-projects.properties` (see math [sonar-projects.properties](./math/sonar-projects.properties) for example)
* Add a GitHub Workflow entry for running the scans (see [test.yml](.github/workflows/test.yml))
* Add an entry for skipping the tests (see [test-skip.yml](.github/workflows/test-skip.yml))
* Ask the team to add the project to SonarCloud

## Protobuf
Expand Down
3 changes: 1 addition & 2 deletions client/v2/sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ sonar.test.inclusions=**/*_test.go
sonar.go.coverage.reportPaths=coverage.out

sonar.sourceEncoding=UTF-8
sonar.scm.provider=git
sonar.pullrequest.github.summary_comment=true
sonar.scm.provider=git
3 changes: 1 addition & 2 deletions core/sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ sonar.test.inclusions=**/*_test.go
sonar.go.coverage.reportPaths=coverage.out

sonar.sourceEncoding=UTF-8
sonar.scm.provider=git
sonar.pullrequest.github.summary_comment=true
sonar.scm.provider=git
3 changes: 1 addition & 2 deletions depinject/sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ sonar.test.inclusions=**/*_test.go
sonar.go.coverage.reportPaths=coverage.out

sonar.sourceEncoding=UTF-8
sonar.scm.provider=git
sonar.pullrequest.github.summary_comment=true
sonar.scm.provider=git
5 changes: 2 additions & 3 deletions errors/sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
sonar.projectKey=cosmos-sdk-errors
sonar.organization=cosmos

sonar.projectName=Cosmos SDK Errors
sonar.projectName=Cosmos SDK - Errors
sonar.project.monorepo.enabled=true

sonar.sources=.
Expand All @@ -11,5 +11,4 @@ sonar.test.inclusions=**/*_test.go
sonar.go.coverage.reportPaths=coverage.out

sonar.sourceEncoding=UTF-8
sonar.scm.provider=git
sonar.pullrequest.github.summary_comment=true
sonar.scm.provider=git
3 changes: 1 addition & 2 deletions math/sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ sonar.test.inclusions=**/*_test.go
sonar.go.coverage.reportPaths=coverage.out

sonar.sourceEncoding=UTF-8
sonar.scm.provider=git
sonar.pullrequest.github.summary_comment=true
sonar.scm.provider=git
3 changes: 1 addition & 2 deletions simapp/sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ sonar.test.inclusions=**/*_test.go
sonar.go.coverage.reportPaths=coverage.out

sonar.sourceEncoding=UTF-8
sonar.scm.provider=git
sonar.pullrequest.github.summary_comment=true
sonar.scm.provider=git
1 change: 0 additions & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ sonar.go.coverage.reportPaths=coverage.out,*profile.out
sonar.python.version=3
sonar.sourceEncoding=UTF-8
sonar.scm.provider=git
sonar.pullrequest.github.summary_comment=true

# Exclude C/C++/Objective-C files from analysis
sonar.c.file.suffixes=-
Expand Down
3 changes: 1 addition & 2 deletions tools/cosmovisor/sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ sonar.test.inclusions=**/*_test.go
sonar.go.coverage.reportPaths=coverage.out

sonar.sourceEncoding=UTF-8
sonar.scm.provider=git
sonar.pullrequest.github.summary_comment=true
sonar.scm.provider=git
3 changes: 1 addition & 2 deletions tools/rosetta/sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ sonar.test.inclusions=**/*_test.go
sonar.go.coverage.reportPaths=coverage.out

sonar.sourceEncoding=UTF-8
sonar.scm.provider=git
sonar.pullrequest.github.summary_comment=true
sonar.scm.provider=git
3 changes: 1 addition & 2 deletions tx/sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,4 @@ sonar.test.inclusions=**/*_test.go
sonar.go.coverage.reportPaths=coverage.out

sonar.sourceEncoding=UTF-8
sonar.scm.provider=git
sonar.pullrequest.github.summary_comment=true
sonar.scm.provider=git

0 comments on commit 089e647

Please sign in to comment.