D13: CI — pytest + ruff (.github/workflows/ci.yml)
- Новый workflow: setup-python 3.11 + `pip install -e ".[dev]"` - Гейты: `ruff check .`, `ruff format --check .`, `pytest -q` - Триггеры: push в dev/main/master/agent/**, pull_request, workflow_dispatch - Кэш pip по pyproject.toml
This commit is contained in:
1 parent
9562adb53f
commit
60ac9252ec
1 file changed
+40
@@ -0,0 +1,40 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- dev
|
||||
- main
|
||||
- master
|
||||
- "agent/**"
|
||||
pull_request:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: pytest + ruff
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
cache: pip
|
||||
cache-dependency-path: pyproject.toml
|
||||
|
||||
- name: Install project and dev tools
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install -e ".[dev]"
|
||||
|
||||
- name: ruff check
|
||||
run: ruff check .
|
||||
|
||||
- name: ruff format
|
||||
run: ruff format --check .
|
||||
|
||||
- name: pytest
|
||||
run: pytest -q
|
||||
Reference in new issue
Block a user