mirror of
https://github.com/dream-num/univer.git
synced 2026-09-01 15:29:43 +08:00
5bbbec339a
Co-authored-by: GitHub Actions <actions@github.com>
53 lines
1.6 KiB
YAML
53 lines
1.6 KiB
YAML
name: 🎭 Playwright Tests
|
|
|
|
on:
|
|
pull_request:
|
|
branches:
|
|
- dev
|
|
|
|
jobs:
|
|
e2e-test:
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: ./.github/actions/setup-node
|
|
|
|
- name: Install Playwright Browsers
|
|
run: pnpm exec playwright install --with-deps chromium
|
|
|
|
- name: Build E2E Client
|
|
run: pnpm build:e2e
|
|
|
|
- name: Run Playwright Tests
|
|
run: pnpm exec playwright test --output=playwright-assets
|
|
|
|
- name: 🚀 Deploy to Vercel
|
|
uses: amondnet/vercel-action@v25
|
|
id: vercel-e2e-report
|
|
with:
|
|
vercel-token: ${{ secrets.VERCEL_TOKEN }}
|
|
vercel-org-id: ${{ secrets.ORG_ID }}
|
|
vercel-project-id: ${{ secrets.PROJECT_ID_E2E }}
|
|
|
|
- name: Generate Playwright Report
|
|
uses: daun/playwright-report-summary@v3
|
|
if: always()
|
|
with:
|
|
report-file: playwright-report.json
|
|
custom-info: 'For more information, [see full report](${{ steps.vercel-e2e-report.outputs.preview-url }})'
|
|
|
|
- name: Upload Artifact
|
|
uses: actions/upload-artifact@v4
|
|
if: ${{ !cancelled() }}
|
|
with:
|
|
name: playwright-report
|
|
path: playwright-report/
|
|
retention-days: 30
|