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"]