-
Notifications
You must be signed in to change notification settings - Fork 49
42 lines (37 loc) · 1.12 KB
/
test.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
name: Cypress E2E tests
on:
pull_request:
branches:
- master
jobs:
cypress-run:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
cache: 'yarn'
- name: Install
run: yarn --immutable
- name: Unit tests
run: yarn test
- name: Cypress run
# Uses the official Cypress GitHub action https://github.com/cypress-io/github-action
uses: cypress-io/github-action@v5
with:
install-command: yarn --immutable
browser: chrome
start: yarn run start-e2e
wait-on: 'http://localhost:3000' # Waits for above
wait-on-timeout: 120 # Waits for 2 minutes
# Records to Cypress Dashboard
record: true
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
# created by the GH Action automatically
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check the coverage value
run: yarn test-coverage