Skip to content

πŸ“Š Update public repo stats [automated] #103

πŸ“Š Update public repo stats [automated]

πŸ“Š Update public repo stats [automated] #103

Workflow file for this run

name: SonarQube
on:
push:
branches:
- main
- master
- develop
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonarqube:
name: SonarQube Scan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install dependencies (best effort)
continue-on-error: true
run: |
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
if [ -f pyproject.toml ]; then pip install . || true; fi
pip install coverage pytest || true
- name: Run tests with coverage (best effort)
continue-on-error: true
run: |
if [ -d tests ] || [ -d test ]; then
coverage run -m pytest || true
coverage xml -o coverage.xml || true
fi
- name: SonarQube Scan
uses: SonarSource/sonarqube-scan-action@v5
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}