Skip to content

Commit

Permalink
Final touches to Sonarcloud (#2030)
Browse files Browse the repository at this point in the history
* Remove sonar host env var
* Fix coverage
  • Loading branch information
vcastellm committed Nov 3, 2023
1 parent 4dc5d91 commit 42ee55f
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 14 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@ jobs:
needs: build
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
1 change: 0 additions & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ jobs:
needs: build
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}

e2e:
name: PolyBFT E2E Tests
Expand Down
12 changes: 1 addition & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ on: # yamllint disable-line rule:truthy
secrets:
SONAR_TOKEN:
required: false
SONAR_HOST_URL:
required: false
outputs:
workflow_output:
description: "Unit tests output"
Expand All @@ -29,6 +27,7 @@ jobs:
uses: actions/checkout@v3
with:
submodules: recursive
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis

- name: Install Dependencies
run: ./setup-ci.sh
Expand All @@ -41,15 +40,6 @@ jobs:
id: run_tests_failure
run: echo "test_output=false" >> $GITHUB_OUTPUT

sonar-scan:
name: SonarQube Scan
needs: go_test
runs-on: ubuntu-latest
steps:
- name: Checkout Branch
uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: SonarCloud Scan
if: ${{ env.HAVE_SONAR_TOKEN == 'true' }}
uses: SonarSource/sonarcloud-github-action@master
Expand Down
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ sonar.projectKey=0xPolygon_polygon-edge
sonar.organization=0xpolygon

sonar.sources=.
sonar.exclusions=**/*_test.go,**/vendor/**,**/*.py,**/core-contracts/**,**/tests/**
sonar.exclusions=**/vendor/**,**/*.py,**/core-contracts/**,**/tests/**

sonar.tests=.
sonar.test.inclusions=**/*_test.go
Expand Down

0 comments on commit 42ee55f

Please sign in to comment.