From 79ae03bf953d5a84d9bb9c9b9b2f3ba0676249ff Mon Sep 17 00:00:00 2001 From: Art_Sakura <1754798088@qq.com> Date: Fri, 23 Oct 2026 10:20:55 +0800 Subject: [PATCH] =?UTF-8?q?fixed=20#=20=E4=BF=AE=E5=A4=8D=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E6=B5=81BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/nonebot-preview.yml | 1 + .github/workflows/zhenxun-preview.yml | 1 + scripts/check_workflows.py | 12 ++++++++++++ 3 files changed, 14 insertions(+) diff --git a/.github/workflows/nonebot-preview.yml b/.github/workflows/nonebot-preview.yml index 958b6f6..2463f20 100644 --- a/.github/workflows/nonebot-preview.yml +++ b/.github/workflows/nonebot-preview.yml @@ -33,6 +33,7 @@ jobs: - run: >- python -m pip install "Pillow>=10.4,<13" setuptools wheel "PyYAML>=6,<7" build + -r integrations/astrbot/requirements.txt - run: python scripts/ci_font.py - run: python scripts/check_workflows.py - run: python scripts/verify_foundation.py diff --git a/.github/workflows/zhenxun-preview.yml b/.github/workflows/zhenxun-preview.yml index 7f2003c..326383d 100644 --- a/.github/workflows/zhenxun-preview.yml +++ b/.github/workflows/zhenxun-preview.yml @@ -42,6 +42,7 @@ jobs: run: >- python -m pip install "Pillow==$PILLOW_VERSION" setuptools wheel "PyYAML>=6,<7" + -r integrations/astrbot/requirements.txt - run: python scripts/ci_font.py - run: python scripts/check_workflows.py - run: python scripts/verify_foundation.py diff --git a/scripts/check_workflows.py b/scripts/check_workflows.py index 29cbac7..a2cb583 100644 --- a/scripts/check_workflows.py +++ b/scripts/check_workflows.py @@ -49,6 +49,18 @@ def main(): nonebot = yaml.load(( root / ".github/workflows/nonebot-preview.yml" ).read_text(encoding="utf-8"), Loader=yaml.BaseLoader) + for workflow in (source, nonebot): + install_commands = [ + step.get("run", "").split() + for step in workflow["jobs"]["test"]["steps"] + ] + if not any( + any(tokens[index:index + 2] == [ + "-r", "integrations/astrbot/requirements.txt", + ] for index in range(len(tokens) - 1)) + for tokens in install_commands + ): + raise ValueError("Full test suite requires AstrBot dependencies") if nonebot["permissions"] != {"contents": "read"}: raise ValueError("NoneBot source permissions differ") trigger = nonebot["on"]