From a1c261a90079281110e0c4b3879e06aaf320b953 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 12 Jun 2026 04:56:46 +0000 Subject: [PATCH] =?UTF-8?q?ci:=20gate=20Pages=20=E9=83=A8=E7=BD=B2?= =?UTF-8?q?=E4=BA=8E=20lint=20+=20pytest=20=E9=80=9A=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit deploy.yml 与 ci.yml 此前各自独立触发,lint/测试失败的代码仍会部署到 GitHub Pages。新增 test 作业(ruff + pytest),build 依赖其通过后才执行。 --- .github/workflows/deploy.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index fe7abc3..b612520 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -15,7 +15,27 @@ concurrency: cancel-in-progress: false jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v6 + + - name: Setup Python + uses: actions/setup-python@v6 + with: + python-version: '3.12' + + - name: Install dev dependencies + run: pip install -r requirements-dev.txt + + - name: Ruff (lint) + run: ruff check scripts/ tests/ + + - name: Pytest + run: pytest -v + build: + needs: test runs-on: ubuntu-latest steps: - name: Checkout