Skip to content

Commit 9ed531d

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

File tree

1 file changed

+17
-19
lines changed

1 file changed

+17
-19
lines changed

.github/workflows/ci.yml

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -13,39 +13,37 @@ jobs:
1313
fail-fast: false
1414
matrix:
1515
os: [ ubuntu-latest, windows-latest ]
16-
python-version: [ "3.11" ]
16+
python-version: [ "3.11", "3.12" ]
1717

1818
steps:
1919
- name: Check out repository
2020
uses: actions/checkout@v4
2121

22-
# 1. Настройка Python
2322
- name: Set up Python ${{ matrix.python-version }}
2423
uses: actions/setup-python@v5
2524
with:
2625
python-version: ${{ matrix.python-version }}
2726

28-
# 2. Установка uv
29-
- name: Install uv
30-
run: pip install uv
31-
32-
# 3. Создание venv и установка зависимостей
33-
- name: Create venv and install dependencies
27+
- name: Install uv and dependencies
3428
run: |
29+
pip install uv
3530
uv venv
3631
uv pip install -e ".[dev]"
3732
38-
# 4. Запуск проверок (единый шаг для всех ОС)
39-
- name: Run Linting and Tests
40-
run: |
41-
echo "--- Running Lint and Format Check ---"
42-
uv run ruff check src/ tests/
43-
uv run ruff format --check src/ tests/
44-
45-
echo "--- Running Tests with Coverage ---"
46-
uv run coverage run -m unittest discover tests
47-
48-
# 5. Загрузка отчета
33+
- name: Run linting and formatting check
34+
run: .venv/bin/python -m ruff check src/ tests/ && .venv/bin/python -m ruff format --check src/ tests/
35+
if: runner.os != 'Windows'
36+
- name: Run linting and formatting check (Windows)
37+
run: .\.venv\Scripts\python.exe -m ruff check src/ tests/ ; .\.venv\Scripts\python.exe -m ruff format --check src/ tests/
38+
if: runner.os == 'Windows'
39+
40+
- name: Run tests and generate coverage report
41+
run: .venv/bin/python -m coverage run -m unittest discover tests
42+
if: runner.os != 'Windows'
43+
- name: Run tests and generate coverage report (Windows)
44+
run: .\.venv\Scripts\python.exe -m coverage run -m unittest discover tests
45+
if: runner.os == 'Windows'
46+
4947
- name: Upload coverage reports to Codecov
5048
uses: codecov/codecov-action@v4
5149
with:

0 commit comments

Comments
 (0)