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

Setup SonarCloud for MM Docs repo #1655

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
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
19 changes: 19 additions & 0 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
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@5875562561d22a34be0c657405578705a169af6c
env:
SONAR_TOKEN: ${{ secrets.SONAR_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