修复bot-check工作流

This commit is contained in:
molanp 2024-12-16 23:04:06 +08:00 committed by GitHub
parent 5956ec1148
commit 2b77e313ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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,9 +55,18 @@ 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: |
portey 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