diff --git a/.gitea/workflows/format_code.yml b/.gitea/workflows/format_code.yml new file mode 100644 index 0000000..a08e8d0 --- /dev/null +++ b/.gitea/workflows/format_code.yml @@ -0,0 +1,33 @@ +# ============================================================ +# Auto format code +# ============================================================ + +name: Auto Format + +on: + pull_request: + +jobs: + + format: + name: Format code + runs-on: ubuntu-latest + + steps: + + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Install formatter + run: pip install ruff + + # Автоматическое форматирование + - name: Run formatter + run: ruff format . + + # Проверка что после форматирования нет изменений + - name: Check formatting + run: ruff check .