ci: 为 Playwright 测试添加超时限制和报告生成
- 在 GitLab CI 配置文件中为 Playwright 测试阶段添加 60 分钟的超时限制 - 在测试完成后生成报告,无论测试是否成功 - 优化测试报告的生成和存储,确保在所有情况下都能生成报告
This commit is contained in:
parent
52365501f0
commit
356a048508
@ -1,6 +1,7 @@
|
||||
playwright_tests:
|
||||
stage: test
|
||||
image: mcr.microsoft.com/playwright:v1.51.0-noble
|
||||
timeout: 60 minutes
|
||||
cache:
|
||||
key: $CI_COMMIT_REF_SLUG
|
||||
paths:
|
||||
@ -17,10 +18,12 @@ playwright_tests:
|
||||
else
|
||||
echo "Tests failed! Sending failure message..."
|
||||
fi
|
||||
- ls -la playwright-report/
|
||||
artifacts:
|
||||
paths:
|
||||
- playwright-report/
|
||||
expire_in: 1 week
|
||||
when: always
|
||||
tags:
|
||||
- test
|
||||
only:
|
||||
|
||||
Reference in New Issue
Block a user