Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,21 +21,21 @@ jobs:
with:
fetch-depth: 0 # To ensure non-shallow git clones for sonar

- name: Set up Python ${{ matrix.python-version }}
- name: Set up python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[dev]
pip install -e .[dev]

- name: Run pytest
run: |
pytest --cov=objdictgen --cov-report=xml --cov-branch -p no:logging --tb=no
pytest --cov --cov-report=xml --cov-report=term --tb=line

- name: SonarCloud Scan
- name: Sonar scan
uses: SonarSource/sonarqube-scan-action@v6.0.0
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Expand All @@ -60,7 +60,7 @@ jobs:

- name: Run mypy
run: |
mypy src/objdictgen
mypy src
continue-on-error: true


Expand Down
8 changes: 8 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,14 @@ testpaths = [
]
filterwarnings = "ignore::DeprecationWarning"

# Configuration for coverage.py which is used by pytest-cov and SonarQube
[tool.coverage.run]
relative_files = true
branch = true
source = [
"src/objdictgen",
]

[tool.ruff]
line-length = 120
exclude = [
Expand Down
1 change: 1 addition & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ sonar.projectKey=Laerdal_python-objdictgen
sonar.organization=laerdal-foss
sonar.python.coverage.reportPaths=coverage.xml
sonar.exclusions = packaging
sonar.sources = src
sonar.tests = tests
Loading