Add Sonar #14
12
.github/workflows/merge-to-main.yml
vendored
12
.github/workflows/merge-to-main.yml
vendored
@ -20,12 +20,14 @@ jobs:
|
||||
run: |
|
||||
coverage run -m py.test -v
|
||||
coverage xml
|
||||
- name: Report results to DeepSource
|
||||
run: |
|
||||
curl https://deepsource.io/cli | sh
|
||||
./bin/deepsource report --analyzer test-coverage --key python --value-file ./coverage.xml
|
||||
- uses: sonarsource/sonarqube-scan-action@master
|
||||
env:
|
||||
DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }}
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
|
||||
- uses: sonarsource/sonarqube-quality-gate-action@master
|
||||
timeout-minutes: 5
|
||||
env:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
|
||||
build:
|
||||
needs: coverage
|
||||
|
12
.github/workflows/pull-request.yml
vendored
12
.github/workflows/pull-request.yml
vendored
@ -28,9 +28,11 @@ jobs:
|
||||
run: |
|
||||
coverage run -m py.test -v
|
||||
coverage xml
|
||||
- name: Report results to DeepSource
|
||||
run: |
|
||||
curl https://deepsource.io/cli | sh
|
||||
./bin/deepsource report --analyzer test-coverage --key python --value-file ./coverage.xml
|
||||
- uses: sonarsource/sonarqube-scan-action@master
|
||||
env:
|
||||
DEEPSOURCE_DSN: ${{ secrets.DEEPSOURCE_DSN }}
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
|
||||
- uses: sonarsource/sonarqube-quality-gate-action@master
|
||||
timeout-minutes: 5
|
||||
env:
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
|
6
sonar-project.properties
Normal file
6
sonar-project.properties
Normal file
@ -0,0 +1,6 @@
|
||||
sonar.projectKey=luketainton_pypilot_AYHo1eOKSbMjdyWLhHhP
|
||||
sonar.python.version=3.10
|
||||
sonar.python.coverage.reportPaths=coverage.xml
|
||||
sonar.sources=app
|
||||
sonar.tests=tests
|
||||
sonar.exclusions=,.github/**,.gitignore,CODEOWNERS,CHANGELOG.md,LICENSE.md,README.md,renovate.json,requirements-dev.txt,requirements.txt
|
Loading…
x
Reference in New Issue
Block a user