✨ 更好的Bot运行检查

This commit is contained in:
AkashiCoin
2024-08-27 23:30:14 +08:00
parent ab1d0d22dd
commit ee11893074
2 changed files with 39 additions and 13 deletions
+13 -5
View File
@@ -2,9 +2,9 @@ name: 检查bot是否运行正常
on:
push:
branches: [ "dev", "main"]
branches: ["dev", "main"]
pull_request:
branches: [ "dev", "main"]
branches: ["dev", "main"]
jobs:
bot-check:
@@ -24,14 +24,21 @@ jobs:
# Poetry cache depends on OS, Python version and Poetry version.
- name: Cache Poetry cache
id: cache-poetry
uses: actions/cache@v3
with:
path: ~/.cache/pypoetry
key: poetry-cache-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}
- name: Cache Data cache
uses: actions/cache@v3
with:
path: ~/data
key: data-cache-${{ runner.os }}-${{ steps.setup_python.outputs.python-version }}
- name: Install dependencies
if: steps.cache-poetry.outputs.cache-hit != 'true'
run: |
mv scripts/bot_check.py bot_check.py
rm -rf poetry.lock
poetry source remove ali
poetry install --no-root
@@ -40,4 +47,5 @@ jobs:
- name: Check bot run
id: bot_check_run
run: |
poetry run python3 bot_check.py
mv scripts/bot_check.py bot_check.py
poetry run python3 bot_check.py