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
6 changes: 0 additions & 6 deletions .github/workflows/run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
@@ -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 }}
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<p align="center">
<img alt="Github Created At" src="https://img.shields.io/github/created-at/BKDDFS/PerfectFrameAI">
<img alt="GitHub last commit" src="https://img.shields.io/github/last-commit/BKDDFS/PerfectFrameAI">
<a href="https://codecov.io/github/BKDDFS/PerfectFrameAI" >
<img src="https://codecov.io/github/BKDDFS/PerfectFrameAI/graph/badge.svg?token=GT9TGKBGYI"/>
<a href="https://sonarcloud.io/summary/new_code?id=BKDDFS_PerfectFrameAI" >
<img src="https://sonarcloud.io/api/project_badges/measure?project=BKDDFS_PerfectFrameAI&metric=coverage"/>
</a>
<img alt="GitHub Tag" src="https://img.shields.io/github/v/tag/BKDDFS/PerfectFrameAI">
<img alt="shamefile" src="https://img.shields.io/badge/tracked_with-shamefile-fe3434">
Expand Down
12 changes: 12 additions & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -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
Loading