diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index 599aa57..3a579db 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -32,12 +32,6 @@ jobs: - uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 - name: Run tests with coverage run: uv run --group test pytest --cov=perfectframe --cov-report=xml --cov-fail-under=100 - - name: Upload coverage to Codecov - uses: codecov/codecov-action@e79a6962e0d4c0c17b229090214935d2e33f8354 # v6.0.1 - with: - token: ${{ secrets.CODECOV_TOKEN }} - files: ./coverage.xml - fail_ci_if_error: true test-docker: needs: pre-commit diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml new file mode 100644 index 0000000..b928f0e --- /dev/null +++ b/.github/workflows/sonar.yml @@ -0,0 +1,37 @@ +name: SonarCloud + +on: + push: + branches: [main] + pull_request: + branches: [main] + +permissions: + contents: read + pull-requests: read + +jobs: + sonar: + name: SonarCloud Analysis + if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 + with: + fetch-depth: 0 + + - name: Set up Python 3.13 + uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6 + with: + python-version: "3.13" + + - name: Install uv + uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0 + + - name: Run tests with coverage + run: uv run --group test pytest --cov=perfectframe --cov-report=xml + + - name: SonarCloud Scan + uses: SonarSource/sonarqube-scan-action@7006c4492b2e0ee0f816d36501671557c97f5995 # v8.1.0 + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} diff --git a/README.md b/README.md index 2873cd3..0c1a5f5 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,8 @@

Github Created At GitHub last commit - - + + GitHub Tag shamefile diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..b3c3115 --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,12 @@ +sonar.organization=bkddfs +sonar.projectKey=BKDDFS_PerfectFrameAI +sonar.projectName=PerfectFrameAI + +sonar.sources=perfectframe +sonar.tests=tests + +sonar.exclusions=**/tests/**,**/__pycache__/** +sonar.cpd.exclusions=**/tests/** + +sonar.python.version=3.13 +sonar.python.coverage.reportPaths=coverage.xml