Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Ruff
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.13.7"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff pytest
- name: Run Ruff
run: ruff check --output-format=github .
- name: Run unit-tests
run: python -m pytest tests/*
15 changes: 15 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
[tool.ruff.lint]
extend-select = [
"F", # Правила Pyflakes
"W", # Предупреждения PyCodeStyle
"E", # Ошибки PyCodeStyle
"I", # Правильно сортировать импорты
"N", # Нейминг
"UP", # Предупреждать, если что-то можно изменить из-за новых версий Python
"C4", # Ловить неправильное использование comprehensions, dict, list и т.д.
"FA", # Применять from future import annotations
"ISC", # Хорошее использование конкатенации строк
"ICN", # Использовать общие соглашения об импорте
"RET", # Хорошие практики возврата
"SIM", # Общие правила упрощения
]
3 changes: 2 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import pytest
import random

import pytest


@pytest.fixture
def random_array():
Expand Down
1 change: 1 addition & 0 deletions tests/heap_sort.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import pytest

from src.heap_sort import heap_sort


Expand Down