diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index efe6ef4..7c6d983 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -4,7 +4,7 @@ on: branches: ["*"] tags-ignore: ["*"] pull_request: - branches: [main] + types: [opened, synchronize, reopened] jobs: test: @@ -42,3 +42,15 @@ jobs: flags: unittests fail_ci_if_error: true verbose: true + 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 }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}