From 878a75c0f3420853c769fb6549a4fb2d7067eb16 Mon Sep 17 00:00:00 2001 From: Wilson Snyder Date: Sun, 7 Mar 2021 14:57:12 -0500 Subject: [PATCH] Add sonarcloud --- .github/workflows/sonarcloud.yml | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 .github/workflows/sonarcloud.yml diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml new file mode 100644 index 000000000..f957b1669 --- /dev/null +++ b/.github/workflows/sonarcloud.yml @@ -0,0 +1,26 @@ +# DESCRIPTION: Github actions config +# SPDX-License-Identifier: CC0-1.0 + +name: SonarCloud + +on: + push: + branches: + - master + pull_request: + types: [opened, synchronize, reopened] + workflow_dispatch: + +jobs: + sonarcloud: + name: SonarCloud + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis + - name: SonarCloud Scan + uses: SonarSource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}