diff --git a/.gitea/workflows/docs.yml b/.gitea/workflows/docs.yml index 5351263..e686c96 100644 --- a/.gitea/workflows/docs.yml +++ b/.gitea/workflows/docs.yml @@ -9,18 +9,18 @@ on: jobs: check: runs-on: [self-hosted, pod] - container: - image: python:3.12-bookworm steps: - name: Checkout uses: actions/checkout@v4 with: persist-credentials: false - name: Install checker dependencies - run: python3 -m pip install --disable-pip-version-check -r requirements-docs.txt + run: | + python3 -m venv .venv + .venv/bin/python -m pip install --disable-pip-version-check -r requirements-docs.txt - name: Test checker - run: python3 -m unittest discover -s tests -v + run: .venv/bin/python -m unittest discover -s tests -v - name: Check documentation - run: python3 scripts/check_docs.py + run: .venv/bin/python scripts/check_docs.py - name: Check whitespace run: git show --format= --check HEAD diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8276289..c2d21f6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -86,8 +86,9 @@ git diff --check 依赖版本固定在 [requirements-docs.txt](requirements-docs.txt)。安装依赖需要网络,检查器本身离线运行。 Gitea 工作流 [.gitea/workflows/docs.yml](.gitea/workflows/docs.yml) 在 main push、PR 和手动触发时运行, -使用 `[self-hosted, pod]` 与 Python 容器;无需业务秘密或集群权限。 -CI 拉取容器、checkout action 和依赖仍需要对应网络可用。 +使用 `[self-hosted, pod]` 的 Python 虚拟环境;无需业务秘密或集群权限。 +不设置 job `container`:此次 Pod runner 日志确认没有 Docker socket,额外启动 job 容器会在检查前失败。 +CI 获取 checkout action 和依赖仍需要对应网络可用。 检查范围: