Files
vue-ts-example/.github/workflows/playwright.yaml
严浩 b475a7bbdd
Some checks failed
/ lint-build-and-check (push) Failing after 52s
/ build-and-deploy-to-vercel (push) Failing after 1m3s
/ surge (push) Failing after 1m6s
/ playwright (push) Has been skipped
/ depcheck (push) Failing after 2m41s
feat: 添加构建大小统计到 depcheck 工作流,并移除 playwright 工作流中的重复统计
2025-03-25 10:39:18 +08:00

37 lines
1.1 KiB
YAML

defaults:
run:
shell: bash
env:
TZ: Asia/Shanghai
on:
push:
jobs:
surge:
runs-on: ubuntu-latest
outputs:
url: ${{ steps.surge_deploy.outputs.url }}
steps:
- uses: yanhao98/composite-actions/setup-node-environment@ae9301946790d96f75c7ebe54a34bbaf9f5469d0
- run: pnpm run build-only
env:
VITE_BUILD_COMMIT: ${{ github.sha }}
- name: 部署到 Surge
id: surge_deploy
if: ${{ github.actor != 'nektos/act' }} # https://nektosact.com/usage/index.html#skipping-steps
uses: yanhao98/composite-actions/deploy-dist-to-surge@ae9301946790d96f75c7ebe54a34bbaf9f5469d0
playwright:
needs: surge
runs-on: ubuntu-latest
container: yanhao98/runner-images:pnpm-with-playwright
steps:
- uses: yanhao98/composite-actions/setup-node-environment@ae9301946790d96f75c7ebe54a34bbaf9f5469d0
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
env:
BASE_URL: ${{ needs.surge.outputs.url }}