-
-
Notifications
You must be signed in to change notification settings - Fork 75
82 lines (68 loc) · 1.98 KB
/
e2e-tests.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
name: E2E Tests
on:
workflow_call:
push:
branches: [main]
pull_request:
types: [
synchronize, # PR was updated
opened, # PR was open
reopened, # PR was closed and is now open again
ready_for_review, # PR was converted from draft to open
]
concurrency:
group: e2e-tests_${{ github.workflow }}_${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
e2e_tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Run E2E tests
uses: cypress-io/github-action@v6
env:
ELECTRON_EXTRA_LAUNCH_ARGS: '--remote-debugging-port=9222'
with:
install-command: pnpm install --frozen-lockfile
start: pnpm start
wait-on: 'http://[::1]:8080'
- name: Upload test results
uses: actions/upload-artifact@v4
with:
name: test-results
path: ./cypress/downloads
retention-days: 30
visual_tests:
runs-on: ubuntu-latest
needs: [e2e_tests]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
cache: 'pnpm'
- name: Install Dependencies
run: pnpm install --frozen-lockfile --ignore-scripts
- name: Download Cypress test results
uses: actions/download-artifact@v4
with:
name: test-results
path: ./cypress/downloads
- name: Run Visual tests
uses: chromaui/action@v1
env:
CHROMATIC_ARCHIVE_LOCATION: ./cypress/downloads
with:
cypress: true
projectToken: ${{ secrets.CHROMATIC_PROJECT_TOKEN }}
skip: 'dependabot/**'
exitZeroOnChanges: false