Firefox and Webkit #88
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Browser Compatibility Test (Firefox and WebKit) | |
on: | |
schedule: | |
# At the end of every day | |
- cron: '0 0 * * *' | |
workflow_dispatch: | |
inputs: | |
repo: | |
description: 'blocksuite repository to use' | |
required: true | |
type: string | |
default: 'toeverything/blocksuite' | |
ref: | |
description: 'blocksuite branch to use' | |
required: true | |
type: string | |
default: 'master' | |
jobs: | |
main-test: | |
if: github.repository == 'toeverything/blocksuite' | |
name: Playground E2E test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
browsers: [firefox, webkit] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: ${{ inputs.repo || github.repository }} | |
ref: ${{ inputs.ref || github.ref }} | |
- uses: pnpm/action-setup@v4 | |
name: Install pnpm | |
id: pnpm-install | |
- name: Use Node.js LTS | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build playground | |
run: pnpm build:playground | |
- name: Install playwright browsers | |
run: npx playwright install --with-deps ${{ matrix.browsers }} | |
- name: Run playwright test | |
env: | |
BROWSER: ${{ matrix.browsers }} | |
run: pnpm test -- --forbid-only | |
- name: Upload test results | |
if: ${{ failure() }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: test-results-main | |
path: ./test-results | |
if-no-files-found: ignore |