Fix ci.yml #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI (ruff) | |
| on: | |
| push: | |
| branches: [ "**" ] | |
| paths: | |
| - "**.py" | |
| - ".github/workflows/**" | |
| - "pyproject.toml" | |
| pull_request: | |
| paths: | |
| - "**.py" | |
| - ".github/workflows/**" | |
| - "pyproject.toml" | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.12"] # можно добавить "3.11" | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| - name: Setup Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| cache: "pip" | |
| - name: Install ruff | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install ruff | |
| - name: Show ruff version | |
| run: ruff --version | |
| # Проверка форматирования (аналог black) — только проверяем, не правим | |
| - name: Check formatting | |
| run: ruff format --check git/src | |
| # Линт. Если будут ошибки — job завершится с ошибкой | |
| - name: Lint with ruff | |
| run: ruff check git/src --output-format=github |