From 59a97485e8470ab205ea54645dfabff79ac3bfc5 Mon Sep 17 00:00:00 2001 From: Egor Deev Date: Fri, 2 Oct 2026 23:40:56 +0000 Subject: [PATCH] =?UTF-8?q?CI:=20=D1=81=D0=B8=D0=BD=D1=82=D0=B0=D0=BA?= =?UTF-8?q?=D1=81=D0=B8=D1=81,=20=D0=BD=D0=B5=D0=BE=D0=BF=D1=80=D0=B5?= =?UTF-8?q?=D0=B4=D0=B5=D0=BB=D1=91=D0=BD=D0=BD=D1=8B=D0=B5=20=D0=B8=D0=BC?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=B8=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5?= =?UTF-8?q?=D1=80=D0=BA=D0=B0=20=D1=80=D0=B0=D0=B7=D0=B1=D0=BE=D1=80=D0=B0?= =?UTF-8?q?=20=D1=8F=D1=87=D0=B5=D0=B5=D0=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 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..4b647cc --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.10" + - run: pip install ruff==0.14.0 openpyxl==3.1.2 requests==2.31.0 + - name: Синтаксис и неопределённые имена + run: ruff check --select E9,F821,F811 . && python -m py_compile code/*.py + - name: Разбор ячеек меню без eval + working-directory: code + run: | + python -c " + from pars import arithmetic + assert arithmetic('150+30') == 180 and arithmetic('12.5') == 12.5 + try: + arithmetic('__import__(\"os\")') + raise SystemExit('eval-подобный ввод не отвергнут') + except ValueError: + pass"