Skip to content
This repository was archived by the owner on Jul 2, 2024. It is now read-only.

Commit f5e55fd

Browse files
committed
Add SonarCloud Scan step
1 parent 035888b commit f5e55fd

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/sonarcloud.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ jobs:
1414
runs-on: ubuntu-latest
1515

1616
steps:
17-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v3
18+
with:
19+
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
1820
- name: Set up Python
1921
uses: actions/setup-python@v2
2022
with:
@@ -35,3 +37,13 @@ jobs:
3537
with:
3638
name: coverage
3739
path: ./coverage.xml
40+
- name: SonarCloud Scan
41+
uses: SonarSource/sonarcloud-github-action@master
42+
with:
43+
args:
44+
-Dsonar.projectKey=edu-python-course_problem-sets
45+
-Dsonar.organization=edu-python-course
46+
-Dsonar.python.coverage.reportPaths=coverage.xml -X
47+
env:
48+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
49+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

0 commit comments

Comments
 (0)