Compare commits

...

3 Commits

Author SHA1 Message Date
Alexander Tomokhov 246ec2f8bd test4 2024-04-17 01:31:24 +04:00
Alexander Tomokhov f53ce42f63 test3 2024-04-17 00:26:14 +04:00
Alexander Tomokhov 7935766ec4 test2 2024-04-16 23:29:56 +04:00
2 changed files with 3 additions and 1 deletions

View File

@ -6,7 +6,7 @@ steps:
- name: Run Tests and Generate Coverage Report
commands:
- 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="$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
- sonar-scanner -Dsonar.projectKey=SelfPrivacy-REST-API -Dsonar.sources=selfprivacy_api -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:
SONARQUBE_TOKEN:
from_secret: SONARQUBE_TOKEN

View File

@ -85,6 +85,7 @@
rclone
redis
restic
sonar-scanner-cli
self.packages.${system}.pytest-vm
# FIXME consider loading this explicitly only after ArchLinux issue is solved
self.checks.x86_64-linux.default.driverInteractive
@ -151,6 +152,7 @@
start_all()
machine.succeed("cd ${vmtest-src-dir} && coverage run --data-file=/tmp/.coverage -m pytest -p no:cacheprovider -v >&2")
machine.succeed("coverage xml --rcfile=${vmtest-src-dir}/.coveragerc --data-file=/tmp/.coverage >&2")
machine.succeed("sed -i -E 's|<source>${pkgs.lib.strings.escapeRegex self.outPath}</source>|<source>selfprivacy_api</source>|g' coverage.xml")
machine.copy_from_vm("coverage.xml", ".")
machine.succeed("coverage report >&2")
'';