Skip to content

Commit

Permalink
refactor sonarcloud integration
Browse files Browse the repository at this point in the history
  • Loading branch information
fschuch committed Jun 6, 2024
1 parent 81d44ce commit 27e2e10
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,22 @@ jobs:
if: github.ref_type == 'tag'
run: |
python -m pip install hatch
VERSION=$(hatch version)
echo "sonar.projectVersion=$VERSION" >> sonar-project.properties
cat sonar-project.properties
echo "VERSION=$(hatch version)" >> $GITHUB_ENV
- 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 }}
with:
args: >
-Dsonar.organization=fschuch
-Dsonar.projectKey=fschuch_xcompact3d_toolbox
-Dsonar.python.version=3.8, 3.9, 3.10, 3.11, 3.12
-Dsonar.sources=xcompact3d_toolbox
-Dsonar.tests=tests
-Dsonar.python.coverage.reportPaths=coverage.*.xml
${{ github.ref_type == 'tag' && '-Dsonar.projectVersion=' + env.VERSION || '' }}
build:
needs: sonarcloud
Expand Down
6 changes: 0 additions & 6 deletions sonar-project.properties

This file was deleted.

0 comments on commit 27e2e10

Please sign in to comment.