From fadfbe60fc9b227c6526d363840a04fe651eb535 Mon Sep 17 00:00:00 2001 From: LingandRX Date: Thu, 13 Mar 2025 19:55:22 +0800 Subject: [PATCH] =?UTF-8?q?ci(gitlab):=20=E6=9B=B4=E6=96=B0=20Playwright?= =?UTF-8?q?=20=E9=95=9C=E5=83=8F=E7=89=88=E6=9C=AC=E5=B9=B6=E4=BC=98?= =?UTF-8?q?=E5=8C=96=20CI=20=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitlab-ci.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a704105..eec4bf8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,23 +4,19 @@ stages: playwright_tests: stage: test - image: mcr.microsoft.com/playwright:focal + image: mcr.microsoft.com/playwright:v1.43.0-jammy # 使用官方 Playwright 镜像 before_script: - - export NVM_DIR="$HOME/.nvm" - - . "$NVM_DIR/nvm.sh" - - nvm use 20.17.0 - npm config set registry https://registry.npmmirror.com # 使用淘宝镜像 script: - npm install - npx playwright install - - npx playwright install-deps - npx playwright test artifacts: paths: - test-results/ expire_in: 1 week tags: - - test # 指定使用标签为 test 的 Runner + - test only: - main @@ -36,6 +32,6 @@ send_report: echo "No test results found." fi tags: - - test # 指定使用标签为 test 的 Runner + - test only: - main