mirror of
https://github.com/zhenxun-org/zhenxun_bot.git
synced 2025-12-15 06:12:53 +08:00
43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
name: 检查bot是否运行正常
|
|
|
|
on:
|
|
push:
|
|
branches: [ "dev", "main"]
|
|
pull_request:
|
|
branches: [ "dev", "main"]
|
|
|
|
jobs:
|
|
bot-check:
|
|
runs-on: ubuntu-latest
|
|
name: bot check
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Setup Python
|
|
id: setup_python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.10"
|
|
|
|
- name: Install Poetry
|
|
run: pip install poetry
|
|
|
|
# Poetry cache depends on OS, Python version and Poetry version.
|
|
- name: Cache Poetry cache
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: ~/.cache/pypoetry
|
|
key: poetry-cache-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
mv scripts/bot_check.py bot_check.py
|
|
rm -rf poetry.lock
|
|
poetry source remove ali
|
|
poetry install --no-root
|
|
poetry run pip install pydantic==1.10
|
|
|
|
- name: Check bot run
|
|
id: bot_check_run
|
|
run: |
|
|
poetry run python3 bot_check.py |