Skip to content

Fix repository clone instructions in README #43

Fix repository clone instructions in README

Fix repository clone instructions in README #43

Workflow file for this run

name: SonarCloud
on:
push:
branches: [ main, master ]
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonarcloud:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install uv and dependencies
run: |
pip install uv
uv sync --frozen
uv pip install pytest pytest-django coverage
- name: Run tests and build coverage.xml
env:
DJANGO_SETTINGS_MODULE: task_manager.settings
SECRET_KEY: test-secret-key
DEBUG: "False"
DATABASE_URL: sqlite:///./test.sqlite3
ALLOWED_HOSTS: testserver,localhost,127.0.0.1
SECURE_SSL_REDIRECT: "False"
SESSION_COOKIE_SECURE: "False"
CSRF_COOKIE_SECURE: "False"
run: |
mkdir -p reports
uv run coverage erase
uv run coverage run -m pytest --ds=task_manager.settings --junitxml=reports/junit.xml
uv run coverage xml -i -o coverage.xml
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.projectKey=olyapka84_python-project-52
-Dsonar.organization=olyapka84
-Dsonar.python.version=3.11
-Dsonar.sources=task_manager
-Dsonar.tests=task_manager
-Dsonar.test.inclusions=**/tests.py
-Dsonar.exclusions=**/migrations/**,**/__pycache__/**,**/.venv/**,**/venv/**,manage.py
-Dsonar.python.coverage.reportPaths=coverage.xml
-Dsonar.python.xunit.reportPath=reports/junit.xml