Skip to content

Commit 5bfc01c

Browse files
committed
Add step to upload to sonarcloud
1 parent 4503bd7 commit 5bfc01c

File tree

2 files changed

+12
-32
lines changed

2 files changed

+12
-32
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,18 @@ jobs:
2929
- run: pip install -r requirements_dev.txt
3030
- run: pytest tests/unit tests/integration --cov=. --cov-report=xml:coverage.xml --cov-report=html --cov-report=json -vv -s
3131

32+
- name: SonarCloud Scan
33+
uses: SonarSource/sonarqube-scan-action@master
34+
if: github.event_name == 'pull_request'
35+
env:
36+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
37+
with:
38+
args: >
39+
-Dsonar.scm.revision=${{ github.event.workflow_run.head_sha }}
40+
-Dsonar.pullrequest.key=${{ env.PR_NUMBER }}
41+
-Dsonar.pullrequest.branch=${{ env.PR_HEAD }}
42+
-Dsonar.pullrequest.base=${{ env.PR_BASE }}
43+
3244
black:
3345
name: Run black
3446
runs-on: ubuntu-latest

sonar-project.properties

Lines changed: 0 additions & 32 deletions
This file was deleted.

0 commit comments

Comments
 (0)