stages: - test - report playwright_tests: stage: test image: mcr.microsoft.com/playwright:v1.43.0-jammy # 使用官方 Playwright 镜像 before_script: - npm config set registry https://registry.npmmirror.com # 使用淘宝镜像 script: - npm install - npx playwright install - npx playwright test artifacts: paths: - test-results/ expire_in: 1 week tags: - test only: - main send_report: stage: report image: alpine:latest script: - apk add --no-cache curl - | if [ -d test-results ]; then echo "Test Successful." else echo "No test results found." fi tags: - test only: - main