Skip to content

Commit 4503bd7

Browse files
committed
Add stuff to help SonarCloud maybe work
1 parent c27c211 commit 4503bd7

File tree

3 files changed

+37
-3
lines changed

3 files changed

+37
-3
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ jobs:
2626
- name: Install dispatcherd
2727
run: pip install -e .[pg_notify,metrics]
2828
- run: make postgres
29-
- run: pip install pytest pytest-asyncio httpx
30-
- run: pytest tests/unit tests/integration -vv -s
29+
- run: pip install -r requirements_dev.txt
30+
- run: pytest tests/unit tests/integration --cov=. --cov-report=xml:coverage.xml --cov-report=html --cov-report=json -vv -s
3131

3232
black:
3333
name: Run black

requirements_dev.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
pytest
22
pytest-asyncio
3-
pytest-benchmark
3+
pytest-benchmark # for benchmark tests
4+
pytest-cov # for SonarCloud
5+
httpx # used for the metrics server test

sonar-project.properties

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Complete documentation with many more options at:
2+
# https://docs.sonarqube.org/latest/analysis/analysis-parameters/
3+
4+
#sonar.host.url=https://sonarqube.corp.redhat.com
5+
6+
## The unique project identifier. This is mandatory.
7+
# Do not duplicate or reuse!
8+
# Available characters: [a-zA-Z0-9_:\.\-]
9+
# Must have least one non-digit.
10+
# Recommended format: <group>:<project>
11+
sonar.projectKey=ansible-dispatcherd
12+
13+
sonar.organization=ansible
14+
15+
# Customize what paths to scan. Default is .
16+
sonar.sources=.
17+
# Excluse test directories from sources
18+
sonar.exclusions=tools/**
19+
# Set tests root directory
20+
sonar.tests=tests
21+
22+
# Verbose name of project displayed in WUI. Default is set to the projectKey. This field is optional.
23+
sonar.projectName=dispatcherd
24+
25+
# Version of project. This field is optional.
26+
#sonar.projectVersion=1.0
27+
28+
# Tell sonar scanner where coverage files exist
29+
sonar.python.coverage.reportPaths=coverage.xml
30+
31+
# Only scan with python3
32+
sonar.python.version=3.11,3.13

0 commit comments

Comments
 (0)