chore: add Sonar analysis
All checks were successful
Publish Docker Images / build-and-publish (push) Successful in 12m32s

This commit is contained in:
2025-11-16 01:31:19 +01:00
parent 0b60e67e19
commit 399f30157f
3 changed files with 27 additions and 1 deletions

View File

@@ -39,6 +39,16 @@ jobs:
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
skipPush: ${{ github.event_name == 'pull_request' }} skipPush: ${{ github.event_name == 'pull_request' }}
- name: Coverage
run: |
nix develop --no-pure-eval --command just coverage
- name: Sonar analysis
uses: SonarSource/sonarqube-scan-action@v6
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
- name: Build Docker image with Nix - name: Build Docker image with Nix
run: | run: |
echo "Building Docker image..." echo "Building Docker image..."

View File

@@ -5,6 +5,21 @@ gitea: none
# phundrak.com Backend # phundrak.com Backend
<div align="center">
<a href="https://sonar.phundrak.com/dashboard?id=phundrak-backend">
<img src="https://sonar.phundrak.com/api/project_badges/measure?project=phundrak-backend&metric=coverage&token=sqb_bda24bf36825576d6c6b76048044e103339c3c5f" alt="Sonar Coverage" />
</a>
<a href="https://sonar.phundrak.com/dashboard?id=phundrak-backend">
<img src="https://sonar.phundrak.com/api/project_badges/measure?project=phundrak-backend&metric=alert_status&token=sqb_bda24bf36825576d6c6b76048044e103339c3c5f" alt="Sonar Quality Gate Status" />
</a>
<a href="#license">
<img src="https://img.shields.io/badge/License-AGPL--3.0--only-blue" alt="License" />
</a>
<a href="https://www.gnu.org/software/emacs/">
<img src="https://img.shields.io/badge/Made%20with-GNU%2FEmacs-blueviolet.svg?logo=GNU%20Emacs&logoColor=white" alt="Made with GNU/Emacs" />
</a>
</div>
The backend for [phundrak.com](https://phundrak.com), built with Rust and the [Poem](https://github.com/poem-web/poem) web framework. The backend for [phundrak.com](https://phundrak.com), built with Rust and the [Poem](https://github.com/poem-web/poem) web framework.
## Features ## Features
@@ -430,4 +445,4 @@ See [.github/workflows/README.md](./.github/workflows/README.md) for detailed se
## License ## License
AGPL-3.0-only - See the root repository for full license information. AGPL-3.0-only - See [LICENSE.md](./LICENSE.md) for full license information.

1
sonar-project.properties Normal file
View File

@@ -0,0 +1 @@
sonar.projectKey=phundrak-backend