Skip to content

Commit e31bcfe

Browse files
Does this give our test coverage to sonar?
1 parent 2642c2b commit e31bcfe

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,4 @@ test-report.xml
3939

4040
localstack_data/
4141
/volume/*
42+
/coverage.xml

scripts/config/sonar-scanner.properties

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33
sonar.host.url=https://sonarcloud.io
44
sonar.qualitygate.wait=true
55
sonar.sourceEncoding=UTF-8
6-
sonar.sources=.
76

87
#sonar.python.coverage.reportPaths=.coverage/coverage.xml
98
#sonar.[javascript|typescript].lcov.reportPaths=.coverage/lcov.info
9+
10+
sonar.sources=src/
11+
sonar.tests=tests/
12+
#sonar.test.inclusions=**/test_*.py
13+
#sonar.exclusions=**/test_*.py
14+
sonar.python.coverage.reportPaths=coverage.xml

scripts/tests/coverage.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
3+
set -euo pipefail
4+
5+
cd "$(git rev-parse --show-toplevel)"
6+
7+
poetry run pytest tests/unit/ --durations=10 --cov-report= --cov src/eligibility_signposting_api
8+
poetry run python -m coverage xml

0 commit comments

Comments
 (0)