mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2025-01-24 01:36:38 +00:00
Add SonarQube to Pipeline (#15)
Co-authored-by: Alya Sirko <alya@selfprivacy.org> Reviewed-on: https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api/pulls/15 Co-authored-by: Alya Sirko <alya.sirko@tuta.io> Co-committed-by: Alya Sirko <alya.sirko@tuta.io>
This commit is contained in:
parent
9489180363
commit
a3260aadc3
19
.drone.yml
19
.drone.yml
|
@ -2,18 +2,23 @@ kind: pipeline
|
||||||
type: exec
|
type: exec
|
||||||
name: default
|
name: default
|
||||||
|
|
||||||
platform:
|
|
||||||
os: linux
|
|
||||||
arch: amd64
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: test
|
- name: Run Tests and Generate Coverage Report
|
||||||
commands:
|
commands:
|
||||||
- coverage run -m pytest -q
|
- coverage run -m pytest -q
|
||||||
- coverage xml
|
- coverage xml
|
||||||
- name: bandit
|
- sonar-scanner -Dsonar.projectKey=SelfPrivacy-REST-API -Dsonar.sources=. -Dsonar.host.url=http://analyzer.lan:9000 -Dsonar.login="$SONARQUBE_TOKEN"
|
||||||
|
environment:
|
||||||
|
SONARQUBE_TOKEN:
|
||||||
|
from_secret: SONARQUBE_TOKEN
|
||||||
|
|
||||||
|
- name: Run Bandit Checks
|
||||||
commands:
|
commands:
|
||||||
- bandit -ll -r selfprivacy_api
|
- bandit -ll -r selfprivacy_api
|
||||||
- name: formatting
|
|
||||||
|
- name: Run Code Formatting Checks
|
||||||
commands:
|
commands:
|
||||||
- black --check .
|
- black --check .
|
||||||
|
|
||||||
|
node:
|
||||||
|
server: builder
|
||||||
|
|
Loading…
Reference in a new issue