-
Notifications
You must be signed in to change notification settings - Fork 9
90 lines (80 loc) · 2.5 KB
/
e2e.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
81
82
83
84
85
86
87
88
89
90
name: E2E
on:
push:
branches: [ci-e2e/*, "*/e2e/*"]
pull_request:
branches: [main]
schedule:
- cron: 0 1 * * 1-5 # every night before week day, at 1am on dev
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
jobs:
compile:
name: Compile application
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Yarn install
run: yarn --frozen-lockfile --perfer-offline
- name: Compiling
run: yarn compile
env:
SKIP_SENTRY_UPLOAD: 1
TRACKER_MATOMO_ID_SITE: ${{ secrets.TRACKER_MATOMO_ID_SITE }}
TRACKER_MATOMO_URL: ${{ secrets.TRACKER_MATOMO_URL }}
TRACKER_PROVIDER: debug
TRACKER_POSTHOG_API_KEY: ${{ secrets.TRACKER_POSTHOG_API_KEY }}
TRACKER_POSTHOG_URL: ${{ secrets.TRACKER_POSTHOG_URL }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
SENTRY_URL: ${{ secrets.SENTRY_URL }}
- name: Archive dist
uses: actions/upload-artifact@v4
with:
name: compile-dist
path: dist/
E2E:
env:
ELECTRON_CACHE: ${{ github.workspace }}/.cache/electron
name: Run E2E test on ${{ matrix.os }}
needs: compile
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# os: [ubuntu-latest, windows-latest, macos-latest]
os: [windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
- name: Yarn install
run: |
yarn config set network-timeout 300000
yarn --frozen-lockfile --perfer-offline
- name: Download dist
uses: actions/download-artifact@v4
with:
name: compile-dist
path: dist/
- name: Test electron
run: yarn electron -v
- name: Install Playwright deps
run: yarn playwright install-deps chromium
- name: Start Xvfb server
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: ./.github/actions/start-xvfb
- name: Run Playwright
timeout-minutes: 15
run: yarn test:e2e
- name: Clean Xvfb
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: ./.github/actions/kill-xvfb