Skip to content

feat(docs): add incremental layout worker #4648

feat(docs): add incremental layout worker

feat(docs): add incremental layout worker #4648

Workflow file for this run

name: 🎭 Playwright Tests
on:
pull_request:
branches:
- dev
types:
- opened
- synchronize
- reopened
- ready_for_review
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: write
env:
TURBO_TELEMETRY_DISABLED: '1'
jobs:
e2e-shard:
name: e2e-test shard (${{ matrix.shard-index }}/${{ matrix.shard-total }})
if: github.repository == 'dream-num/univer' && (github.event_name != 'pull_request' || !github.event.pull_request.draft)
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
matrix:
shard-index: [1, 2, 3, 4]
shard-total: [4]
env:
GH_TOKEN: ${{ github.token }}
steps:
- name: Checkout
uses: actions/checkout@v7
with:
persist-credentials: false
- name: Setup Node.js
uses: ./.github/actions/setup-node
- name: Cache Playwright browsers
id: playwright-cache
uses: actions/cache/restore@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: Save Playwright browsers
if: matrix.shard-index == 1 && steps.playwright-cache.outputs.cache-hit != 'true'
uses: actions/cache/save@v6
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ hashFiles('pnpm-lock.yaml') }}
- name: Build E2E Client
run: pnpm build:e2e
- name: Run Playwright Tests
run: pnpm exec playwright test --shard=${{ matrix.shard-index }}/${{ matrix.shard-total }}
- name: Write Playwright Report to PR Comment
uses: daun/playwright-report-summary@v4
if: always()
with:
report-file: playwright-report.json
custom-info: 'For more information, [see full report and artifacts](https://github.com/dream-num/univer/actions/runs/${{ github.run_id }})'
- name: Upload Artifact
uses: actions/upload-artifact@v7
if: ${{ !cancelled() }}
with:
name: playwright-report-${{ matrix.shard-index }}-of-${{ matrix.shard-total }}
path: playwright-report/
retention-days: 7
- name: Upload HeapSnapshots
uses: actions/upload-artifact@v7
if: ${{ failure() }}
with:
name: snapshots-${{ matrix.shard-index }}-of-${{ matrix.shard-total }}
path: test-results/*.heapsnapshot
retention-days: 3
e2e-test:
name: e2e-test
runs-on: minimum-runner
timeout-minutes: 5
needs: e2e-shard
if: ${{ always() && github.repository == 'dream-num/univer' && (github.event_name != 'pull_request' || !github.event.pull_request.draft) }}
steps:
- name: Check shard results
run: |
if [ "${{ needs.e2e-shard.result }}" != "success" ]; then
echo "One or more e2e shards failed: ${{ needs.e2e-shard.result }}"
exit 1
fi
echo "All e2e shards passed"