-
Notifications
You must be signed in to change notification settings - Fork 14
49 lines (41 loc) · 1.2 KB
/
e2e-tests.yaml
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
name: End to end tests
on:
pull_request:
paths:
- 'packages/documentation/**'
- 'packages/styles/**'
- 'packages/components/**'
- 'packages/internet-header/**'
- 'packages/icons/**'
workflow_dispatch:
jobs:
e2e:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup
uses: swisspost/design-system/.github/actions/setup-pnpm@main
with:
use_cache: false
- name: Cache cypress
uses: actions/cache@v3
with:
path: /home/runner/.cache/Cypress
key: ${{ runner.os }}-cypress-${{ hashFiles('./pnpm-lock.yaml') }}
restore-keys: ${{ runner.os }}-cypress-
- name: Install & build dependencies
run: pnpm bootstrap
- name: Cypress info
run: pnpm --filter design-system-documentation exec cypress info
- name: Run tests
run: pnpm e2e:ci
- name: Upload screenshots
uses: actions/[email protected]
if: failure()
with:
name: cypress-snapshots
path: packages/documentation/cypress/screenshots
retention-days: 14