diff --git a/.drone.yml b/.drone.yml
index 55595e9..bf2a81e 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -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=. -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:
SONARQUBE_TOKEN:
from_secret: SONARQUBE_TOKEN
diff --git a/flake.nix b/flake.nix
index ae4e173..d72b10b 100644
--- a/flake.nix
+++ b/flake.nix
@@ -152,7 +152,8 @@
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 xml --data-file=/tmp/.coverage -o /tmp/coverage.xml >&2")
- machine.succeed("sed -E 's|||g' /tmp/coverage.xml")
+ machine.succeed("head /tmp/coverage.xml >&2")
+ machine.succeed("sed -i -E 's|||g' /tmp/coverage.xml")
machine.copy_from_vm("/tmp/coverage.xml", ".")
machine.succeed("coverage report --rcfile=.coveragerc --data-file=/tmp/.coverage >&2")
'';