fix(ci): mount DATA_DIR and docker for Gitea nightly host jobs
Avoid all-SKIP false PASS and exit-127 without receipt when image build lacks docker. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
|
||||
| owner | task | branch | worktree | mutex | status |
|
||||
|-------|------|--------|----------|-------|--------|
|
||||
| Cursor | 2026-09-16-gitea-nightly-docker-datadir | fix/gitea-nightly-docker-datadir | - | ci | in_progress |
|
||||
| Cursor | 2026-09-16-gitea-nightly-host-tools | fix/gitea-nightly-host-tools | - | ci | done |
|
||||
| Cursor | 2026-09-16-wave-leftovers | fix/wave-leftovers-n7-playwright-dod | - | ci | done |
|
||||
| Cursor | 2026-09-16-wave3-pu6-pu8-go-no-go | feature/wave3-pu6-pu8-go-no-go | - | architecture-docs | done |
|
||||
|
||||
@@ -24,8 +24,9 @@ blocker: false
|
||||
|
||||
- label:`nightly:host`(写入 `runner/data/.runner`,勿只改 compose)
|
||||
- `network_mode: host` + `address=http://127.0.0.1:3000`(PI 只绑 `127.0.0.1:18865`,bridge 不可达)
|
||||
- 挂载 brew + 宿主机 glibc,供 host job 使用 `node` / `go` / `curl`
|
||||
- workflow:`runs-on: nightly`;artifact 用本地 tar(Gitea 不支持 upload-artifact@v4)
|
||||
- 挂载 brew + 宿主机 glibc + `/usr/bin/docker` + `/host-agent-data`(仓库 `data/`)
|
||||
- workflow:`DATA_DIR=/host-agent-data/test`;artifact 用本地 tar(Gitea 不支持 upload-artifact@v4)
|
||||
- `run-nightly-real-pi.sh`:全 SKIP / 镜像构建失败 → `infra_fail` receipt(不再 silent exit 127)
|
||||
|
||||
## 验证
|
||||
|
||||
|
||||
@@ -29,6 +29,8 @@ jobs:
|
||||
RUNNER_AUTH_TOKEN: ${{ secrets.RUNNER_AUTH_TOKEN }}
|
||||
PI_AGENT_RUNNER_AUTH_TOKEN: ${{ secrets.RUNNER_AUTH_TOKEN }}
|
||||
TEST_DATABASE_URL: ${{ secrets.NIGHTLY_TEST_DATABASE_URL }}
|
||||
# Local act_runner mounts repo data at /host-agent-data (see /home/weichen/gitea compose).
|
||||
DATA_DIR: /host-agent-data/test
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
|
||||
@@ -146,7 +146,19 @@ fi
|
||||
set -e
|
||||
|
||||
if [[ "${TEST_RC}" -eq 0 ]]; then
|
||||
ensure_candidate_images
|
||||
# go test exits 0 on all-SKIP; treat that as infra (shared DATA_DIR / runner mount).
|
||||
if ! grep -Eq '^--- PASS:' "${LOG_FILE}" && grep -Eq '^--- SKIP:' "${LOG_FILE}"; then
|
||||
echo "all matching tests skipped (likely missing DATA_DIR/workspaces)" | tee "${EVIDENCE_DIR}/infra-tests-skipped.txt"
|
||||
write_receipt infra_fail infra "${LOG_FILE}" "${EVIDENCE_DIR}/infra-tests-skipped.txt"
|
||||
echo "infrastructure failure: suite skipped instead of executing" >&2
|
||||
exit 1
|
||||
fi
|
||||
if ! ensure_candidate_images; then
|
||||
echo "candidate image build failed" | tee "${EVIDENCE_DIR}/infra-image-build.txt"
|
||||
write_receipt infra_fail infra "${LOG_FILE}" "${EVIDENCE_DIR}/infra-image-build.txt"
|
||||
echo "infrastructure failure: candidate image build" >&2
|
||||
exit 1
|
||||
fi
|
||||
write_receipt pass none "${LOG_FILE}" "${EVIDENCE_DIR}/runner-health.json"
|
||||
echo "nightly real-PI PASS; receipt written for ${COMMIT:0:12}"
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user