-
-
Notifications
You must be signed in to change notification settings - Fork 48
70 lines (58 loc) · 1.74 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
name: Run end-to-end tests
on:
push:
branches:
- 'main'
pull_request:
# Allows to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
e2e-browser-extension:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '18'
- name: Prepare extension
working-directory: browser-extension
run: |
EXTENSION_BROWSER=chrome MANIFEST_VERSION=3 yarn configure
- uses: cypress-io/github-action@v6
with:
working-directory: tests
browser: chrome
headed: true
spec: "cypress/e2e/browser-extension/**/*"
config: baseUrl=https://www.youtube.com
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: tests/cypress/screenshots
e2e-frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Start dev env
run: ./dev-env/run-docker-compose.sh
env:
FRONTEND_START_SCRIPT: "start:e2e"
- uses: actions/setup-node@v4
with:
node-version: '18'
- uses: cypress-io/github-action@v6
with:
working-directory: tests
browser: chrome
headed: true # necessary to reflect the correct behavior of media queries (e.g. in ComparisonInput)
spec: "cypress/e2e/frontend/**/*"
- name: Print dev-env logs
if: failure()
working-directory: ./dev-env
run: docker-compose logs -t --tail=300
- uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-screenshots
path: tests/cypress/screenshots