Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add sonarcloud #1672

Closed
wants to merge 7 commits into from
Closed
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
24 changes: 0 additions & 24 deletions .github/workflows/dependency_review.yml

This file was deleted.

7 changes: 7 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@ jobs:
SENTRY_KEY: ${{ secrets.SENTRY_KEY }}
GF_SURVEY_KEY: ${{ secrets.GF_SURVEY_KEY }}

sonarcloud:
name: Sonarcloud
uses: ./.github/workflows/sonarcloud.yml
secrets:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

all-jobs-completed:
name: All jobs completed
runs-on: ubuntu-latest
Expand All @@ -54,6 +60,7 @@ jobs:
- build
- lint
- case
- sonarcloud
outputs:
PASSED: ${{ steps.set-output.outputs.PASSED }}
steps:
Expand Down
20 changes: 20 additions & 0 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Sonarcloud

on:
workflow_call:
secrets:
SONAR_TOKEN:
required: true

jobs:
sonarcloud:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@383f7e52eae3ab0510c3cb0e7d9d150bbaeab838
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15 changes: 15 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Unique sonar data by project
sonar.projectKey=metamask-docs
sonar.organization=metamask

# Source
sonar.sources=src
# sonar.exclusions=

# Tests
# sonar.tests=src,test
# sonar.test.inclusions=**/*.test.ts
# sonar.javascript.lcov.reportPaths=coverage/coverage/unit/lcov.info

# Block PRs with quality gate failures
sonar.qualitygate.wait=false
Loading