Skip to content

Commit 9485eeb

Browse files
authored
Merge pull request #2 from CSO2/cicd/sonar
sonar init
2 parents c7fa651 + 31637d7 commit 9485eeb

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

.github/workflows/build-test.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,12 @@ jobs:
4040
run: |
4141
pytest
4242
43+
- name: SonarQube Scan
44+
uses: SonarSource/sonarqube-scan-action@v4
45+
env:
46+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
47+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
48+
4349
- name: Extract branch name
4450
id: branch
4551
run: |

sonar-project.properties

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
sonar.projectKey=<INSERT_PROJECT_KEY>
2+
sonar.organization=<INSERT_ORGANIZATION_KEY>
3+
sonar.host.url=https://sonarcloud.io
4+
5+
# Source code
6+
sonar.sources=.
7+
sonar.exclusions=**/venv/**,**/__pycache__/**,**/*.pyc,**/.pytest_cache/**,**/htmlcov/**
8+
9+
# Tests
10+
# Adjust this based on where your tests are located
11+
sonar.tests=.
12+
sonar.test.inclusions=tests/**,**/test_*.py,**/*_test.py

0 commit comments

Comments
 (0)