From 6c6e49eecc577402c88b7574e089eebbc1e422ee Mon Sep 17 00:00:00 2001 From: Matthias Bisping Date: Tue, 19 Apr 2022 18:02:30 +0200 Subject: [PATCH] updated sonarscran.sh to use containerized tests --- .../src/main/resources/scripts/sonar-scan.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/bamboo-specs/src/main/resources/scripts/sonar-scan.sh b/bamboo-specs/src/main/resources/scripts/sonar-scan.sh index 6381dcd..9286748 100755 --- a/bamboo-specs/src/main/resources/scripts/sonar-scan.sh +++ b/bamboo-specs/src/main/resources/scripts/sonar-scan.sh @@ -6,11 +6,17 @@ export JAVA_HOME=/usr/bin/sonar-scanner/jre python3 -m venv build_venv source build_venv/bin/activate python3 -m pip install --upgrade pip +python3 -m pip install dependency-check +python3 -m pip install coverage -echo "dev setup for unit test and coverage 💖" +echo "coverage report generation" -pip install -e . -pip install -r requirements.txt +bash run_tests.sh + +if [ ! -f reports/coverage.xml ] +then + exit 1 +fi SERVICE_NAME=$1