Skip to content

Commit 7e5b2d8

Browse files
Samuli RasiSamuli Rasi
authored andcommitted
Add video parameter
Add an optional video parameter that can be used in which ever repo to enable video recording in the workflow file. Tags also don't need separate steps in the action so tag related settings are combined in the other steps.
1 parent 2020ea9 commit 7e5b2d8

1 file changed

Lines changed: 11 additions & 6 deletions

File tree

github-actions/run-cypress-tests/action.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,27 @@ inputs:
1010
it to ''.
1111
required: false
1212
default: "@smoke"
13+
video:
14+
description:
15+
Turn video on or off. Supported values are 'true' and 'false'.
16+
required: false
17+
default: 'false'
1318

1419
runs:
1520
using: "composite"
1621
steps:
17-
- name: Run all tests using the e2e docker bundle's cypress container
18-
if: inputs.test-tags == ''
22+
- name: Run tests using the e2e docker bundle's cypress container
23+
if: inputs.video == 'false'
1924
run: |
2025
docker exec cypress \
21-
bash -c "yarn test:e2e"
26+
bash -c "yarn test:e2e --env grepTags='${{ inputs.test-tags }}'"
2227
shell: bash
2328

24-
- name: Run tests that have the provided tags
25-
if: startsWith(inputs.test-tags, '@')
29+
- name: Run tests and enable video
30+
if: inputs.video == 'true'
2631
run: |
2732
docker exec cypress \
28-
bash -c "yarn test:e2e --env grepTags='${{ inputs.test-tags }}'"
33+
bash -c "yarn test:e2e --config-file cypress.config.video.ts --env grepTags='${{ inputs.test-tags }}'"
2934
shell: bash
3035

3136
- name: Retrieve test reports from container

0 commit comments

Comments
 (0)