Skip to content

Commit

Permalink
ci: enable sonarcloud scan
Browse files Browse the repository at this point in the history
  • Loading branch information
pl-buiquang committed Nov 21, 2024
1 parent 20042a9 commit 218a330
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
25 changes: 12 additions & 13 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,19 +96,18 @@ jobs:
coverage xml --omit="*/test*","*/migrations/*" -o coverage.xml
coverage html --omit="*/test*","*/migrations/*" -d htmlcov
# TODO activate this when the project is public
# sonarcloud:
# name: SonarCloud
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# with:
# fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
# - 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 }}
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- 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 }}

publish:
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/')
Expand Down
3 changes: 2 additions & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
sonar.projectKey=dev_back-end_AYZLPvyZr5OIf3IX6my9
sonar.projectKey=aphp_Cohort360-Back-end
sonar.organization=aphp
sonar.qualitygate.wait=true
sonar.python.version=3
sonar.python.coverage.reportPaths=./coverage.xml
Expand Down

0 comments on commit 218a330

Please sign in to comment.