-
-
Notifications
You must be signed in to change notification settings - Fork 58
70 lines (70 loc) · 2.08 KB
/
web2022.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: Web testing 2022
on:
push:
# Only trigger if files in this path changed
paths:
- 'web-testing-2022/**'
- '.github/workflows/web2022.yml'
# Don't run on Markdown changes
- '!**.md'
branches: [ master, visual_end ]
pull_request:
# Only trigger if files in this path changed
paths:
- 'web-testing-2022/**'
- '.github/workflows/web2022.yml'
# Don't run on Markdown changes
- '!**.md'
branches: [ master, visual_end ]
jobs:
build-test:
runs-on: ubuntu-latest
defaults:
run:
working-directory: web-testing-2022
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 100
- uses: actions/setup-node@v1
# Install NPM dependencies, cache them correctly
# and run all Cypress tests
# - name: Cypress run
# uses: cypress-io/github-action@v4
# with:
# build: npm run build
# start: npm start
# browser: chrome
# command-prefix: npx happo-e2e -- npx
# working-directory: web-testing-2022
# env:
# # Inject secrets to the build
# HAPPO_API_KEY: ${{ secrets.HAPPO_API_KEY }}
# HAPPO_API_SECRET: ${{ secrets.HAPPO_API_SECRET }}
- name: Install dependencies 📦
#Using npm ci is generally faster than running npm install
run: |
ls -a
npm install
- name: Start the app
run: |
npm start &
npx wait-on --timeout 60000
# - name: Run cypress
# uses: cypress-io/github-action@v2
# with:
# command-prefix: npx happo-e2e -- npx
# env:
# # Inject secrets to the build
# HAPPO_API_KEY: ${{ secrets.HAPPO_API_KEY }}
# HAPPO_API_SECRET: ${{ secrets.HAPPO_API_SECRET }}
# - name: Run e2e tests
# run: |
# npm run test:cy:sanity
- name: Run visual tests 👁
run: |
ls -a
npm run test:visual
env:
HAPPO_API_KEY: ${{ secrets.HAPPO_API_KEY }}
HAPPO_API_SECRET: ${{ secrets.HAPPO_API_SECRET }}