Skip to content

Commit 21c4602

Browse files
committed
[fix:project] Another update CI\CD
1 parent 31c4680 commit 21c4602

File tree

1 file changed

+18
-30
lines changed

1 file changed

+18
-30
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -19,47 +19,35 @@ jobs:
1919
- name: Check out repository
2020
uses: actions/checkout@v4
2121

22+
# 1. Настройка Python
23+
- name: Set up Python ${{ matrix.python-version }}
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: ${{ matrix.python-version }}
27+
28+
# 2. Установка uv
2229
- name: Install uv
23-
run: curl -LsSf https://astral.sh/uv/install.sh | sh
24-
if: runner.os != 'Windows'
25-
- name: Install uv (Windows)
26-
run: powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
27-
if: runner.os == 'Windows'
28-
- name: Add uv to PATH
29-
run: echo "$HOME/.cargo/bin" >> $GITHUB_PATH
30-
if: runner.os != 'Windows'
31-
- name: Add uv to PATH (Windows)
32-
run: echo "$((Get-Item (Get-Command uv).Source).Directory.FullName)" | Out-File -FilePath $env:GITHUB_PATH -Append
33-
if: runner.os == 'Windows'
30+
run: pip install uv
3431

35-
- name: Set up Python and install dependencies
32+
# 3. Создание venv и установка зависимостей
33+
- name: Create venv and install dependencies
3634
run: |
37-
uv venv -p ${{ matrix.python-version }}
35+
uv venv
3836
uv pip install -e ".[dev]"
3937
40-
- name: Run Linting and Tests (Linux/macOS)
41-
if: runner.os != 'Windows'
42-
run: |
43-
echo "--- Running Lint and Format Check ---"
44-
.venv/bin/ruff check src/ tests/
45-
.venv/bin/ruff format --check src/ tests/
46-
47-
echo "--- Running Tests with Coverage ---"
48-
.venv/bin/coverage run -m unittest discover tests
49-
50-
- name: Run Linting and Tests (Windows)
51-
if: runner.os == 'Windows'
52-
shell: pwsh
38+
# 4. Запуск проверок (единый шаг для всех ОС)
39+
- name: Run Linting and Tests
5340
run: |
5441
echo "--- Running Lint and Format Check ---"
55-
.\.venv\Scripts\ruff.exe check src/ tests/
56-
.\.venv\Scripts\ruff.exe format --check src/ tests/
42+
uv run ruff check src/ tests/
43+
uv run ruff format --check src/ tests/
5744
5845
echo "--- Running Tests with Coverage ---"
59-
.\.venv\Scripts\coverage.exe run -m unittest discover tests
46+
uv run coverage run -m unittest discover tests
6047
48+
# 5. Загрузка отчета
6149
- name: Upload coverage reports to Codecov
62-
uses: codecov/codecov-action@v5
50+
uses: codecov/codecov-action@v4
6351
with:
6452
token: ${{ secrets.CODECOV_TOKEN }}
6553
fail_ci_if_error: true

0 commit comments

Comments
 (0)