mirror of
https://github.com/dream-num/univer.git
synced 2026-08-28 14:56:51 +08:00
57 lines
1.6 KiB
YAML
57 lines
1.6 KiB
YAML
name: 🔭 Dev Performance Report
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- dev
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
e2e-test:
|
|
if: github.repository == 'dream-num/univer'
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 20
|
|
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v7
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Set Env
|
|
run: |
|
|
if [ "$GITHUB_EVENT_NAME" == "push" ] && [ "$GITHUB_REF" == "refs/heads/dev" ]; then
|
|
echo "SHOULD_REPORT_TO_POSTHOG=true" >> $GITHUB_ENV
|
|
elif [ "$GITHUB_EVENT_NAME" == "pull_request" ] && [ "$GITHUB_BASE_REF" == "dev" ]; then
|
|
echo "SHOULD_REPORT_TO_POSTHOG=true" >> $GITHUB_ENV
|
|
fi
|
|
|
|
- name: Setup Node.js
|
|
uses: ./.github/actions/setup-node
|
|
|
|
- name: Cache Playwright browsers
|
|
uses: actions/cache@v6
|
|
with:
|
|
path: ~/.cache/ms-playwright
|
|
key: ${{ runner.os }}-playwright-${{ hashFiles('pnpm-lock.yaml') }}
|
|
|
|
- name: Install Playwright Browsers
|
|
run: pnpm exec playwright install --with-deps chromium
|
|
|
|
- name: Build E2E Client
|
|
run: pnpm build:e2e
|
|
|
|
- name: Run Playwright Tests
|
|
env:
|
|
POSTHOG_API_KEY: ${{ secrets.POSTHOG_API_KEY }}
|
|
run: pnpm exec playwright test
|