Skip to content

Commit e9f8534

Browse files
committed
SonarCloud coverage 2
1 parent 204738e commit e9f8534

File tree

1 file changed

+8
-21
lines changed

1 file changed

+8
-21
lines changed

.github/workflows/sonarcloud.yml

Lines changed: 8 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,39 +9,26 @@ on:
99
jobs:
1010
sonarcloud:
1111
runs-on: ubuntu-latest
12-
1312
permissions:
1413
contents: read
1514
pull-requests: read
16-
1715
steps:
18-
- name: Checkout
19-
uses: actions/checkout@v4
16+
- uses: actions/checkout@v4
2017
with:
21-
fetch-depth: 0 # нужно для анализа pull request'ов
22-
23-
- name: Set up Python
24-
uses: actions/setup-python@v5
18+
fetch-depth: 0
19+
- uses: actions/setup-python@v5
2520
with:
2621
python-version: '3.11'
27-
28-
- name: Install dependencies
22+
- name: Install uv and dependencies
2923
run: |
30-
python -m pip install --upgrade pip
31-
pip install -r requirements.txt
32-
# если в requirements.txt нет pytest-cov, добавь:
33-
# pip install pytest pytest-cov
34-
24+
pip install uv
25+
uv sync --frozen
26+
uv pip install --system pytest pytest-cov
3527
- name: Run tests with coverage
3628
env:
3729
DJANGO_SETTINGS_MODULE: task_manager.settings
3830
run: |
39-
pytest \
40-
--ds=task_manager.settings \
41-
--cov=task_manager \
42-
--cov-report=xml:coverage.xml \
43-
--junitxml=reports/junit.xml
44-
31+
pytest --ds=task_manager.settings --cov=task_manager --cov-report=xml:coverage.xml --junitxml=reports/junit.xml
4532
- name: SonarCloud Scan
4633
uses: SonarSource/sonarcloud-github-action@v2
4734
env:

0 commit comments

Comments
 (0)