CI:增强 Markdown 测试报告(失败含日志片段+运行链接),移除 HTML 报告,README 加 CI 徽章与报告入口
build-test-deploy / ci (push) Successful in 7m22s
build-test-deploy / ci (push) Successful in 7m22s
This commit is contained in:
@@ -84,7 +84,11 @@ jobs:
|
||||
docker start "$CID" >/dev/null
|
||||
# Run build + tests (capture exit code, don't fail the step here so
|
||||
# we can still collect the report on failure)
|
||||
docker exec "$CID" /src/ci/build-test.sh
|
||||
docker exec \
|
||||
-e GITHUB_RUN_ID="${{ github.run_id }}" \
|
||||
-e GITHUB_REPOSITORY="${{ github.repository }}" \
|
||||
-e GITHUB_SERVER_URL="${GITEA_SERVER}" \
|
||||
"$CID" /src/ci/build-test.sh
|
||||
TEST_RC=$?
|
||||
mkdir -p bin reports
|
||||
docker cp "$CID:/src/bin/pPowerManger" bin/pPowerManger 2>/dev/null || true
|
||||
@@ -116,8 +120,8 @@ jobs:
|
||||
git config user.email "ci@localhost"
|
||||
git checkout --orphan test-reports >/dev/null 2>&1 || git checkout test-reports >/dev/null 2>&1 || true
|
||||
git rm -rf . >/dev/null 2>&1 || true
|
||||
cp -f reports/test-report.md reports/test-report.html reports/junit.xml . 2>/dev/null || true
|
||||
git add test-report.md test-report.html junit.xml
|
||||
cp -f reports/test-report.md reports/junit.xml . 2>/dev/null || true
|
||||
git add test-report.md junit.xml
|
||||
git commit -m "CI test report ${GITHUB_SHA:-}" >/dev/null 2>&1 || true
|
||||
git push -f origin test-reports >/dev/null 2>&1 || echo "WARN: failed to push test-reports branch"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user