-
Notifications
You must be signed in to change notification settings - Fork 125
64 lines (56 loc) · 1.77 KB
/
testcafe.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
name: TestCafe
on: [pull_request]
env:
BROWSERSTACK_ACCESS_KEY: "${{ secrets.BROWSERSTACK_ACCESS_KEY }}"
BROWSERSTACK_USERNAME: "${{ secrets.BROWSERSTACK_USERNAME }}"
POSTHOG_PROJECT_KEY: "${{ secrets.POSTHOG_PROJECT_KEY }}"
POSTHOG_API_KEY: "${{ secrets.POSTHOG_API_KEY }}"
BROWSERSTACK_DEBUG: 'true'
BROWSERSTACK_NETWORK_LOGS: 'true'
BROWSERSTACK_CONSOLE: 'info'
BROWSERSTACK_FORCE_PROXY: 'true'
BROWSERSTACK_USE_AUTOMATE: 'true'
BROWSERSTACK_PROJECT_NAME: 'PostHog JS SDK'
jobs:
browsers:
name: Test on ${{ matrix.name }}
runs-on: ubuntu-latest
strategy:
matrix:
browser:
- 'chrome:headless'
- 'firefox:headless'
- 'browserstack:ie'
- 'browserstack:safari'
include:
- browser: 'chrome:headless'
name: Chrome
- browser: 'firefox:headless'
name: Firefox
- browser: 'browserstack:ie'
name: IE11
- browser: 'browserstack:safari'
name: Safari
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 8.x.x
- uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'pnpm'
- name: Serve static files
run: python -m http.server 8080 &
- name: Install node dependencies
run: pnpm install
- name: Set up posthog-js
run: pnpm build-rollup
- name: Run ${{ matrix.name }} test
env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
RUN_ID: ${{ github.run_id }}
BROWSER: ${{ matrix.browser }}
run: pnpm testcafe ${{ matrix.browser }} --stop-on-first-fail
- name: Check ${{ matrix.name }} events
run: pnpm check-testcafe-results