-
-
Notifications
You must be signed in to change notification settings - Fork 428
59 lines (49 loc) · 1.53 KB
/
browser-compatibility.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Firefox and Webkit
on:
schedule:
# At the end of every day
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
install-deps:
name: Install Dependencies
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: ./.github/actions/setup
- name: Build
run: yarn exec nx vite:build @blocksuite/playground
main-test:
if: github.repository == 'toeverything/blocksuite'
needs: install-deps
name: Browser Compatibility Test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macos-latest]
browsers: [firefox, webkit]
shard: [1, 2, 3, 4, 5]
steps:
- uses: actions/checkout@v4
with:
repository: ${{ inputs.repo || github.repository }}
ref: ${{ inputs.ref || github.ref }}
- uses: ./.github/actions/setup
- name: Build playground
run: yarn exec nx vite:build @blocksuite/playground
- name: Install playwright browsers
run: npx playwright install --with-deps ${{ matrix.browsers }}
- name: Run playwright test
env:
BROWSER: ${{ matrix.browsers }}
run: yarn test --forbid-only --shard=${{ matrix.shard }}/5
- name: Upload test results
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: test-results-e2e-${{ matrix.os }}-${{ matrix.browsers }}-${{ matrix.shard }}
path: ./tests/test-results
if-no-files-found: ignore