修复bot-check工作流 (#1777)

This commit is contained in:
molanp 2024-12-17 01:29:11 +08:00 committed by GitHub
parent 5956ec1148
commit 91352e4f3a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 6 deletions

View File

@ -2,13 +2,13 @@ name: 检查bot是否运行正常
on:
push:
branches: ["dev", "main"]
branches: ["main"]
paths:
- zhenxun/**
- tests/**
- bot.py
pull_request:
branches: ["dev", "main"]
branches: ["main"]
paths:
- zhenxun/**
- tests/**
@ -55,8 +55,17 @@ jobs:
if: steps.cache-poetry.outputs.cache-hit != 'true'
run: |
rm -rf poetry.lock
poetry source remove ali
poetry source remove aliyun
poetry install --no-root
- name: Install playwright
if: steps.cache-playwright.outputs.cache-hit != 'true'
run: |
poetry run sudo apt-get update
poetry run sudo apt-get install -y libgstreamer-plugins-base1.0-0 libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-libav flite x264 libx264-dev
poetry run sudo playwright install-deps
poetry run pip install playwright
poetry run sudo playwright install
- name: Run tests
run: poetry run pytest --cov=zhenxun --cov-report xml

View File

@ -1,6 +1,6 @@
[tool.poetry]
name = "zhenxun_bot"
version = "0.1.1"
version = "0.2.4"
description = "基于 Nonebot2 和 go-cqhttp 开发,以 postgresql 作为数据库非常可爱的绪山真寻bot"
authors = ["HibiKier <775757368@qq.com>"]
license = "AGPL"
@ -47,10 +47,10 @@ python-multipart = "^0.0.9"
aiocache = "^0.12.2"
py-cpuinfo = "^9.0.0"
nonebot-plugin-uninfo = "^0.4.1"
nonebot-plugin-alconna = "^0.53.1"
nonebot-plugin-alconna = "^0.54.0"
[tool.poetry.dev-dependencies]
nonebug = "^0.3.2"
nonebug = "^0.4.2"
pytest-cov = "^5.0.0"
pytest-mock = "^3.6.1"
pytest-asyncio = "^0.23.5"