forked from cypress-io/github-action
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (38 loc) · 1.23 KB
/
example-custom-command.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
name: example-custom-command
on:
push:
branches:
- 'master'
pull_request:
workflow_dispatch:
jobs:
# ~~~~~~~~~~~~~~~~~~ Cypress v9 and below (using Legacy configuration) ~~~~~~~~~~~~~~~~~~~ #
start-v9:
# example where instead of forming the default "cypress run ..."
# the user can specify their own command
runs-on: ubuntu-22.04
steps:
- name: Checkout 🛎
uses: actions/checkout@v3
- name: Custom tests 🧪
uses: ./
with:
command: npm run custom-test
working-directory: examples/v9/custom-command
- name: Show saved file 🖨
run: cat examples/v9/custom-command/results.json
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Cypress v10 and higher ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
start:
# example where instead of forming the default "cypress run ..."
# the user can specify their own command
runs-on: ubuntu-22.04
steps:
- name: Checkout 🛎
uses: actions/checkout@v3
- name: Custom tests 🧪
uses: ./
with:
command: npm run custom-test
working-directory: examples/custom-command
- name: Show saved file 🖨
run: cat examples/custom-command/results.json