mirror of
https://git.selfprivacy.org/SelfPrivacy/selfprivacy-rest-api.git
synced 2025-01-30 20:56:39 +00:00
WIP: test 3
This commit is contained in:
parent
943d3a4d7e
commit
1988460ab7
|
@ -6,7 +6,7 @@ steps:
|
||||||
- name: Run Tests and Generate Coverage Report
|
- name: Run Tests and Generate Coverage Report
|
||||||
commands:
|
commands:
|
||||||
- VM_TEST_OUT_PATH="$(nix build .#checks.x86_64-linux.default --no-link --print-out-paths --print-build-logs)"
|
- VM_TEST_OUT_PATH="$(nix build .#checks.x86_64-linux.default --no-link --print-out-paths --print-build-logs)"
|
||||||
- sonar-scanner -Dsonar.projectKey=SelfPrivacy-REST-API -Dsonar.sources=. -Dsonar.host.url=http://analyzer.lan:9000 -Dsonar.login="$SONARQUBE_TOKEN" -Dsonar.python.coverage.reportPaths="$VM_TEST_OUT_PATH/coverage.xml" -Dsonar.python.version=3.10
|
- sonar-scanner -Dsonar.projectKey=SelfPrivacy-REST-API -Dsonar.sources="$PWD" -Dsonar.host.url=http://analyzer.lan:9000 -Dsonar.login="$SONARQUBE_TOKEN" -Dsonar.python.coverage.reportPaths="$VM_TEST_OUT_PATH/coverage.xml" -Dsonar.python.version=3.10
|
||||||
environment:
|
environment:
|
||||||
SONARQUBE_TOKEN:
|
SONARQUBE_TOKEN:
|
||||||
from_secret: SONARQUBE_TOKEN
|
from_secret: SONARQUBE_TOKEN
|
||||||
|
|
|
@ -152,7 +152,8 @@
|
||||||
start_all()
|
start_all()
|
||||||
machine.succeed("cd ${vmtest-src-dir} && coverage run --data-file=/tmp/.coverage -m pytest -p no:cacheprovider -v >&2")
|
machine.succeed("cd ${vmtest-src-dir} && coverage run --data-file=/tmp/.coverage -m pytest -p no:cacheprovider -v >&2")
|
||||||
machine.succeed("cd ${vmtest-src-dir} && coverage xml --data-file=/tmp/.coverage -o /tmp/coverage.xml >&2")
|
machine.succeed("cd ${vmtest-src-dir} && coverage xml --data-file=/tmp/.coverage -o /tmp/coverage.xml >&2")
|
||||||
machine.succeed("sed -E 's|<source>${pkgs.lib.strings.escapeRegex self.outPath}</source>|<source>.</source>|g' /tmp/coverage.xml")
|
machine.succeed("head /tmp/coverage.xml >&2")
|
||||||
|
machine.succeed("sed -i -E 's|<source>${pkgs.lib.strings.escapeRegex self.outPath}</source>|<source>.</source>|g' /tmp/coverage.xml")
|
||||||
machine.copy_from_vm("/tmp/coverage.xml", ".")
|
machine.copy_from_vm("/tmp/coverage.xml", ".")
|
||||||
machine.succeed("coverage report --rcfile=.coveragerc --data-file=/tmp/.coverage >&2")
|
machine.succeed("coverage report --rcfile=.coveragerc --data-file=/tmp/.coverage >&2")
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in a new issue