-
-
Notifications
You must be signed in to change notification settings - Fork 428
80 lines (72 loc) · 2.16 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
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:
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@v3
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- uses: actions/setup-node@v3
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@v2
with:
name: test-results-main
path: ./test-results
if-no-files-found: ignore