GitHub Actions Email Tests Need Evidence
说明与用途
CI 中的邮件测试现在生成证据包,快速诊断失败原因,避免随机重试。
问题
Email verification tests in CI often fail with vague messages, making it hard to diagnose whether the issue is timing, inbox sharing, or API rejection.
结果
Email tests now produce consistent evidence bundles that turn flaky failures into quick investigations, reducing retry cycles and improving test reliability.
工作流
- Generate a unique correlation ID for each test run
- Run email tests with continue-on-error=true
- Upload evidence artifacts using actions/upload-artifact@v4 with if: always()
- If tests failed, exit with failure after artifacts are uploaded
证据
The key is to write these files even when a retry succeeds. Otherwise, the first failure disappears and the green result hides a slow or broken dependency.
Upload artifacts with if: always() is the important line.
- 记录日期: 2026-09-15T13:00:33.132Z