Skip to content

Commit

Permalink
Add sonarcloud analysis
Browse files Browse the repository at this point in the history
Signed-off-by: Sylvain Leclerc <[email protected]>
  • Loading branch information
sylvlecl committed Jul 29, 2024
1 parent dfb037c commit 708822d
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,22 @@ jobs:
pytest --cov antarest --cov-report xml
- name: Archive code coverage results
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: python-code-coverage-report
path: coverage.xml

sonarcloud:
runs-on: ubuntu-20.04
needs: [ci]
steps:
- uses: actions/checkout@v4
- name: Download python coverage report
uses: actions/download-artifact@v4
with:
name: python-code-coverage-report
- name: SonarCloud Scan
uses: sonarsource/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
7 changes: 7 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
sonar.projectVersion=0.0.1
sonar.organization=antaressimulatorteam
sonar.projectKey=AntaresSimulatorTeam_antares-timeseries-generation
sonar.sources=src
sonar.language=python
sonar.python.coverage.reportPaths=coverage.xml
sonar.python.version=3.11

0 comments on commit 708822d

Please sign in to comment.