Skip to content

Commit 1991739

Browse files
authored
Merge branch 'main' into feature/pandapower-3-compatibility
2 parents a7641de + 5f534fd commit 1991739

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,11 @@ jobs:
9393
9494
- name: Test and Coverage
9595
run: |
96-
pytest --cov-report=xml:coverage.xml --cov-fail-under=0
96+
pytest
9797
9898
# Fix relative paths in coverage file
9999
# Known bug: https://community.sonarsource.com/t/sonar-on-github-actions-with-python-coverage-source-issue/36057
100-
sed -i 's@/home/runner/work/power-grid-model-io/power-grid-model-io@/github/workspace@g' coverage.xml
100+
sed -i 's@/home/runner/work/power-grid-model-io/power-grid-model-io@/github/workspace@g' python_coverage.xml
101101
102102
- name: SonarCloud Scan
103103
if: ${{ (github.event_name == 'push') || (github.event.pull_request.head.repo.owner.login == 'PowerGridModel') }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ __pycache__/
1616
.mypy_cache/
1717
.pytest_cache/
1818
cov_html/
19+
python_coverage.xml
1920

2021
# Virtual environment
2122
venv*/

pyproject.toml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,14 @@ power_grid_model_io = ["config/**/*.yaml", "py.typed"]
8181

8282
[tool.pytest.ini_options]
8383
testpaths = ["tests/unit"]
84-
addopts = ["--cov=power_grid_model_io", "--cov-report=term", "--cov-report=html:cov_html", "--cov-fail-under=98.5"]
84+
addopts = [
85+
"--cov=power_grid_model_io",
86+
"--cov-report=term",
87+
"--cov-report=html:cov_html",
88+
"--cov-report=xml:python_coverage.xml",
89+
"--cov-fail-under=98.5",
90+
]
91+
xfail_strict = true
8592

8693
[tool.black]
8794
line-length = 120

sonar-project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ sonar.sources=src
1010
sonar.tests=tests
1111
sonar.sourceEncoding=UTF-8
1212
sonar.python.version=3
13-
sonar.python.coverage.reportPaths=/github/workspace/coverage.xml
13+
sonar.python.coverage.reportPaths=python_coverage.xml

0 commit comments

Comments
 (0)