From f7b22ed764cf38ac9b9fb3883825303e310df88e Mon Sep 17 00:00:00 2001 From: Egor Deev Date: Mon, 5 Oct 2026 18:00:17 +0000 Subject: [PATCH] =?UTF-8?q?CI:=20ruff,=20=D1=80=D0=B0=D0=B7=D0=B1=D0=BE?= =?UTF-8?q?=D1=80=20=D0=BD=D0=BE=D0=BC=D0=B5=D1=80=D0=BE=D0=B2=20=D0=BA?= =?UTF-8?q?=D0=B0=D0=B1=D0=B8=D0=BD=D0=B5=D1=82=D0=BE=D0=B2=20=D0=B8=20?= =?UTF-8?q?=D0=B8=D0=BC=D0=BF=D0=BE=D1=80=D1=82=20=D0=B1=D0=BE=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..bb51111 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,32 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + lfs: false + - uses: actions/setup-python@v5 + with: + python-version: "3.10" + - run: pip install ruff==0.14.0 -r requirements.txt + - name: Ruff (синтаксис и ошибки) + run: ruff check --select E9,F --ignore F403,F405 src/code + - name: Разбор номеров кабинетов и импорт бота + working-directory: src/code + env: + BOT_TOKEN: "123456:TEST" + run: | + python -c " + import asyncio, scripts + r = asyncio.run(scripts.get_routes('pr', 'пр2202а')) + assert r[-1].endswith('pr-2b-02f-2202аc.mp4'), r + assert asyncio.run(scripts.get_routes('pr', 'пр')) is None + import handlers, init + print('ok')"