File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,21 +21,21 @@ jobs:
2121 with :
2222 fetch-depth : 0 # To ensure non-shallow git clones for sonar
2323
24- - name : Set up Python ${{ matrix.python-version }}
24+ - name : Set up python ${{ matrix.python-version }}
2525 uses : actions/setup-python@v6
2626 with :
2727 python-version : ${{ matrix.python-version }}
2828
2929 - name : Install dependencies
3030 run : |
3131 python -m pip install --upgrade pip
32- pip install .[dev]
32+ pip install -e .[dev]
3333
3434 - name : Run pytest
3535 run : |
36- pytest --cov=objdictgen --cov-report=xml --cov-branch -p no:logging -- tb=no
36+ pytest --cov --cov-report=xml --cov-report=term -- tb=line
3737
38- - name : SonarCloud Scan
38+ - name : Sonar scan
3939 uses :
SonarSource/[email protected] 4040 env :
4141 SONAR_TOKEN : ${{ secrets.SONAR_TOKEN }}
6060
6161 - name : Run mypy
6262 run : |
63- mypy src/objdictgen
63+ mypy src
6464 continue-on-error : true
6565
6666
Original file line number Diff line number Diff line change @@ -79,6 +79,14 @@ testpaths = [
7979]
8080filterwarnings = " ignore::DeprecationWarning"
8181
82+ # Configuration for coverage.py which is used by pytest-cov and SonarQube
83+ [tool .coverage .run ]
84+ relative_files = true
85+ branch = true
86+ source = [
87+ " src/objdictgen" ,
88+ ]
89+
8290[tool .ruff ]
8391line-length = 120
8492exclude = [
Original file line number Diff line number Diff line change @@ -2,4 +2,5 @@ sonar.projectKey=Laerdal_python-objdictgen
22sonar.organization =laerdal-foss
33sonar.python.coverage.reportPaths =coverage.xml
44sonar.exclusions = packaging
5+ sonar.sources = src
56sonar.tests = tests
You can’t perform that action at this time.
0 commit comments