SonarCloud

This commit is contained in:
2022-08-13 21:18:27 +01:00
parent 2e8a5589e1
commit 33095ac6e4
2 changed files with 13 additions and 3 deletions

View File

@ -1,6 +1,9 @@
name: CI
on:
push:
branches: [ main ]
pull_request:
types: [opened, synchronize, reopened]
paths-ignore:
- 'README.md'
- 'LICENSE.md'
@ -30,11 +33,18 @@ jobs:
run: |
coverage run -m py.test -v --junitxml=testresults.xml
coverage xml
- uses: sonarsource/sonarqube-scan-action@master
- 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_CLOUD }}
- name: SonarQube Scan
uses: sonarsource/sonarqube-scan-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
- uses: sonarsource/sonarqube-quality-gate-action@master
- name: SonarQube Quality Gate
uses: sonarsource/sonarqube-quality-gate-action@master
timeout-minutes: 5
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}