-
Notifications
You must be signed in to change notification settings - Fork 25
34 lines (31 loc) · 1.03 KB
/
repeat-spec.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
name: repeat-spec
on:
workflow_dispatch:
description: Lets the user run a spec file N times in a row
inputs:
spec:
description: Part or full path to the spec file like "editing-spec.js"
required: true
type: string
n:
description: Number of times to repeat the test
required: false
default: 1
type: integer
jobs:
repeat-spec:
runs-on: ubuntu-22.04
steps:
- name: Print workflow inputs
run: |
echo Running the spec file "${{ github.event.inputs.spec }}"
echo for ${{ github.event.inputs.n }} times
- name: Checkout 🛎
uses: actions/checkout@v4
# https://github.com/cypress-io/github-action
- name: Run the spec N times
uses: cypress-io/github-action@v2
with:
start: npm run start-quiet
# use https://github.com/bahmutov/cypress-repeat to repeat the spec
command: npx cypress-repeat -n ${{ github.event.inputs.n }} --spec '**/${{ github.event.inputs.spec }}'