123
This commit is contained in:
33
.gitea/workflows/format_code.yml
Normal file
33
.gitea/workflows/format_code.yml
Normal file
@@ -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 .
|
||||
Reference in New Issue
Block a user