Skip to content

Commit

Permalink
Make test coverage available in sonarcloud
Browse files Browse the repository at this point in the history
  • Loading branch information
berrydenhartog committed May 1, 2024
1 parent a85b6d5 commit 0988257
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 6 deletions.
17 changes: 11 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ jobs:
- name: run pyright
run: poetry run pyright

- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

security:
runs-on: ubuntu-latest
steps:
Expand Down Expand Up @@ -130,6 +124,17 @@ jobs:
overwrite: true


- name: run coverage xml
run: poetry run coverage html

- name: SonarCloud Scan
if: matrix.python-version == '3.11'
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}


build:
needs: test
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@ sonar.sources=.

# Encoding of the source code. Default is default system encoding
sonar.sourceEncoding=UTF-8

sonar.python.version=3.11

sonar.python.coverage.reportPaths=coverage.xml

0 comments on commit 0988257

Please sign in to comment.