Skip to content

Commit 86e6a32

Browse files
committed
allow tests to run/not run cross service tests
1 parent 0ba6d98 commit 86e6a32

File tree

2 files changed

+37
-4
lines changed

2 files changed

+37
-4
lines changed

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

Lines changed: 25 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@ inputs:
88
required: false
99
accessibility_tests:
1010
default: 'false'
11+
reporting_tests:
12+
default: 'false'
13+
imms_api_tests:
14+
default: 'false'
1115
device:
1216
required: true
1317
base_url:
@@ -46,11 +50,28 @@ runs:
4650
- name: Choose test suite to run
4751
id: marker
4852
run: |
49-
if [ "${{ inputs.accessibility_tests }}" = "true" ]; then
50-
echo "marker=accessibility" >> $GITHUB_OUTPUT
51-
else
52-
echo "marker=not accessibility" >> $GITHUB_OUTPUT
53+
exclude=""
54+
if [ "${{ inputs.accessibility_tests }}" = "false" ]; then
55+
exclude="not accessibility"
56+
fi
57+
if [ "${{ inputs.reporting_tests }}" = "false" ]; then
58+
if [ -n "$exclude" ]; then
59+
exclude="$exclude and not reporting"
60+
else
61+
exclude="not reporting"
62+
fi
63+
fi
64+
if [ "${{ inputs.imms_api_tests }}" = "false" ]; then
65+
if [ -n "$exclude" ]; then
66+
exclude="$exclude and not imms_api"
67+
else
68+
exclude="not imms_api"
69+
fi
70+
fi
71+
if [ -z "$exclude" ]; then
72+
exclude="True"
5373
fi
74+
echo "marker=$exclude" >> $GITHUB_OUTPUT
5475
shell: bash
5576

5677
- name: Determine if reruns are enabled

.github/workflows/functional_selected_device.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,14 @@ on:
7171
description: 'Tests to run (leave blank to run all tests!)'
7272
required: false
7373
default: ''
74+
cross_service_tests:
75+
description: 'Include imms api and reporting tests'
76+
required: false
77+
default: 'true'
78+
type: choice
79+
options:
80+
- true
81+
- false
7482
device:
7583
description: 'Device to test'
7684
required: true
@@ -162,6 +170,7 @@ jobs:
162170
)
163171
if [ "${{ github.event_name }}" = "push" ]; then
164172
echo "tests=" >> $GITHUB_OUTPUT
173+
echo "cross_service_tests=true" >> $GITHUB_OUTPUT
165174
echo "device=Desktop Chrome" >> $GITHUB_OUTPUT
166175
echo "environment=${env_map[qa]}" >> $GITHUB_OUTPUT
167176
echo "programmes=FLU,HPV,MENACWY,MMR,TD_IPV" >> $GITHUB_OUTPUT
@@ -210,6 +219,9 @@ jobs:
210219
uses: ./.github/actions/run-functional-tests
211220
with:
212221
tests: ${{ steps.set-variables.outputs.tests }}
222+
imms_api_tests: ${{ steps.set-variables.outputs.cross_service_tests }}
223+
reporting_tests: ${{ steps.set-variables.outputs.cross_service_tests }}
224+
github_ref: ${{ inputs.github_ref || github.head_ref }}
213225
device: ${{ steps.set-variables.outputs.device }}
214226
base_url: ${{ steps.set-variables.outputs.environment }}
215227
programmes_enabled: ${{ steps.set-variables.outputs.programmes }}

0 commit comments

Comments
 (0)