From 64a8346f3b5f31b21ff7b872faeca15635a52640 Mon Sep 17 00:00:00 2001 From: Whyverum Date: Mon, 8 Dec 2025 16:43:42 +0700 Subject: [PATCH] =?UTF-8?q?CI-=D1=82=D0=B5=D1=81=D1=82=D1=8B=20=D0=B4?= =?UTF-8?q?=D0=BB=D1=8F=20=D1=80=D0=B5=D0=BF=D0=BE=D0=B7=D0=B8=D1=82=D0=BE?= =?UTF-8?q?=D1=80=D0=B8=D1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/ci.yaml | 48 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 .gitea/workflows/ci.yaml diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml new file mode 100644 index 0000000..43dffd9 --- /dev/null +++ b/.gitea/workflows/ci.yaml @@ -0,0 +1,48 @@ +name: CI + +on: + push: + branches: [ main, master ] + pull_request: + branches: [ main, master ] + +jobs: + basic-checks: + runs-on: ubuntu-latest + + env: + BOT_TOKEN: "TEST_TOKEN" + PREFIX: "!" + WELCOME_CHANNEL_ID: "123456789012345678" + ADMIN_ROLE_NAME: "Администратор" + LOG_LEVEL: "info" + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.13" + + - name: Install Poetry + uses: snok/install-poetry@v1 + with: + version: "1.8.3" + virtualenvs-create: true + virtualenvs-in-project: true + installer-parallel: true + + - name: Install dependencies + run: | + poetry install --no-interaction --no-root + + - name: Basic import checks + run: | + poetry run python -c "import configs; from bot import Bot; print('Bot class ok')" + poetry run python -c "from bot import discbot; print('Global bot instance ok')" + + - name: Load cogs without running bot + run: | + poetry run python -c "from bot import discbot; import asyncio; asyncio.run(discbot.setup()); print('Cogs loaded')"