-
Notifications
You must be signed in to change notification settings - Fork 101
/
Copy pathrun-tests.yml
34 lines (32 loc) · 1 KB
/
run-tests.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
description: >
A single, complete job to run Cypress tests
parameters:
working-directory:
description: Directory containing package.json
type: string
default: "."
start-command:
description: Command used to start your local dev server for Cypress to tests against
type: string
default: ""
cypress-command:
description: Command used to run your Cypress tests
type: string
default: "npx cypress run"
steps:
- when:
condition: << parameters.start-command >>
steps:
- run:
name: Start Server
command: << parameters.start-command >>
background: true
working_directory: << parameters.working-directory >>
- run:
name: Run Cypress
command: << parameters.cypress-command >>
working_directory: << parameters.working-directory >>
- store_artifacts:
path: << parameters.working-directory >>/cypress/videos
- store_artifacts:
path: << parameters.working-directory >>/cypress/screenshots