Skip to content

Commit

Permalink
chore: wip sonar
Browse files Browse the repository at this point in the history
  • Loading branch information
christopherferreira9 committed Jul 1, 2024
1 parent f072c7c commit ca8433f
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 4 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,20 @@ on:

jobs:
sonarcloud-scan:
runs-on: ubuntu-latest
name: Run SonarCloud Scan
uses: MetaMask/metamask-sdk/.github/workflows/sonar-cloud.yml@535a911b02d28a61ab305841f8b14b83e91c7000
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
steps:
- name: Checkout project sources
uses: actions/checkout@v4

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
build-scan-publish: true
build-scan-terms-of-use-url: "https://gradle.com/terms-of-service"
build-scan-terms-of-use-agree: "yes"

- name: Run sonar
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew sonar -Dsonar.token=$SONAR_TOKEN
3 changes: 2 additions & 1 deletion metamask-android-sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ sonar {
properties {
property "sonar.projectKey", "metamask-android-sdk"
property "sonar.organization", "metamask"
property "sonar.host.url", "https://sonarcloud.io"
property "sonar.sources", "metamask-android-sdk/src/main/java"
property "sonar.exclusions", "**/generated/**"
}
}

Expand Down

0 comments on commit ca8433f

Please sign in to comment.