From 356a0485086da62d294cf1268cdcb6f9741af222 Mon Sep 17 00:00:00 2001 From: LingandRX Date: Sat, 22 Mar 2025 12:18:48 +0800 Subject: [PATCH] =?UTF-8?q?ci:=20=E4=B8=BA=20Playwright=20=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E6=B7=BB=E5=8A=A0=E8=B6=85=E6=97=B6=E9=99=90=E5=88=B6?= =?UTF-8?q?=E5=92=8C=E6=8A=A5=E5=91=8A=E7=94=9F=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 GitLab CI 配置文件中为 Playwright 测试阶段添加 60 分钟的超时限制 - 在测试完成后生成报告,无论测试是否成功 - 优化测试报告的生成和存储,确保在所有情况下都能生成报告 --- .gitlab-ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e0053a5..ebb0144 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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: