mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2024-09-12 04:37:28 +00:00
36 lines
873 B
YAML
36 lines
873 B
YAML
kind: pipeline
|
|
type: exec
|
|
name: default
|
|
|
|
steps:
|
|
- name: Run Tests and Generate Coverage Report
|
|
commands:
|
|
- kill $(ps aux | grep 'redis-server 127.0.0.1:6389' | awk '{print $2}') || true
|
|
- redis-server --bind 127.0.0.1 --port 6389 >/dev/null &
|
|
# We do not care about persistance on CI
|
|
- 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
|
|
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
|
|
|
|
trigger:
|
|
event:
|
|
- push
|