-
-
Notifications
You must be signed in to change notification settings - Fork 48
65 lines (54 loc) · 1.52 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
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@v3
- uses: actions/setup-node@v3
with:
node-version: '18'
- uses: cypress-io/github-action@v5
with:
working-directory: tests
browser: chrome
headed: true
spec: "cypress/e2e/browser-extension/**/*"
config: baseUrl=https://www.youtube.com
- uses: actions/upload-artifact@v1
if: failure()
with:
name: cypress-screenshots
path: tests/cypress/screenshots
e2e-frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Start dev env
run: ./dev-env/run-docker-compose.sh
env:
FRONTEND_START_SCRIPT: "start:e2e"
- uses: actions/setup-node@v3
with:
node-version: '18'
- uses: cypress-io/github-action@v5
with:
working-directory: tests
wait-on: 'http://localhost:3000'
browser: chrome
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@v1
if: failure()
with:
name: cypress-screenshots
path: tests/cypress/screenshots