mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2025-01-09 09:31:04 +00:00
ci: run pytest and coverage as part of nix flake check in VM
This commit is contained in:
parent
edcc7860e4
commit
61b9a00cea
|
@ -5,13 +5,7 @@ name: default
|
||||||
steps:
|
steps:
|
||||||
- name: Run Tests and Generate Coverage Report
|
- name: Run Tests and Generate Coverage Report
|
||||||
commands:
|
commands:
|
||||||
- kill $(ps aux | grep 'redis-server 127.0.0.1:6389' | awk '{print $2}') || true
|
- nix flake check -L
|
||||||
- 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"
|
- sonar-scanner -Dsonar.projectKey=SelfPrivacy-REST-API -Dsonar.sources=. -Dsonar.host.url=http://analyzer.lan:9000 -Dsonar.login="$SONARQUBE_TOKEN"
|
||||||
environment:
|
environment:
|
||||||
SONARQUBE_TOKEN:
|
SONARQUBE_TOKEN:
|
||||||
|
|
Loading…
Reference in a new issue