Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,15 @@ jobs:

- name: Run tests
run: make test

- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@8c71dc039c2dd71d3821e89a2b58ecc7fee6ced9 # v5.3.0
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@fdcc8476540edceab3de004e990f80d881c6cc00 # v5.5.0
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ test:
poetry run pytest leetcode/ \
-v --cov=leetcode --cov=leetcode_py \
--cov-report=term-missing \
--cov-report=xml \
--ignore=leetcode/_template \
--ignore=leetcode/__pycache__

Expand Down
20 changes: 20 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# SonarQube Configuration
sonar.organization=wisaroot
sonar.projectKey=wisarootl_leetcode-py
sonar.projectName=LeetCode Python Solutions
sonar.projectVersion=1.0

# Source code settings
sonar.sources=leetcode,leetcode_py
sonar.tests=leetcode
sonar.test.inclusions=**/tests.py
sonar.exclusions=**/conftest.py,**/_template/**,**/__pycache__/**,**/.venv/**

# Python specific settings
sonar.python.version=3.13

# Coverage settings (if you generate coverage reports)
sonar.python.coverage.reportPaths=coverage.xml

# Code quality settings
sonar.qualitygate.wait=true