selfprivacy-rest-api/.drone.yml

36 lines
873 B
YAML
Raw Normal View History

2021-12-06 21:12:30 +02:00
kind: pipeline
type: exec
2021-12-06 21:11:04 +02:00
name: default
2021-12-06 21:12:30 +02:00
2021-12-06 21:11:04 +02:00
steps:
- name: Run Tests and Generate Coverage Report
2021-12-06 21:11:04 +02:00
commands:
- kill $(ps aux | grep 'redis-server 127.0.0.1:6389' | awk '{print $2}') || true
2022-12-27 06:10:14 +02:00
- redis-server --bind 127.0.0.1 --port 6389 >/dev/null &
# We do not care about persistance on CI
2023-07-17 19:55:16 +03:00
- sleep 10
- redis-cli -h 127.0.0.1 -p 6389 config set stop-writes-on-bgsave-error no
- coverage run -m pytest -q
- coverage xml
- 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
2022-12-27 06:10:14 +02:00
USE_REDIS_PORT: 6389
- name: Run Bandit Checks
commands:
- bandit -ll -r selfprivacy_api
- name: Run Code Formatting Checks
commands:
- black --check .
node:
server: builder
2023-06-23 13:02:52 +03:00
trigger:
event:
- push