Skip to content

Commit 5b1dff3

Browse files
committed
Remove tests-to-run
1 parent f737922 commit 5b1dff3

3 files changed

Lines changed: 24 additions & 12 deletions

File tree

.github/actions/acceptance-tests/action.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,30 @@ runs:
4444
run: |
4545
echo "PR_NUMBER=${{ inputs.targetEnvironment }}" >> $GITHUB_ENV
4646
47+
- name: "Determine if proxy has been deployed"
48+
if: ${{ inputs.testType == 'e2e' }}
49+
id: check_proxy_deployed
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
PR_NUMBER: ${{ steps.pr_exists.outputs.pr_number }}
53+
run: |
54+
if [[ -z "$PR_NUMBER" ]]; then
55+
echo "No pull request detected; proxy deployment was deployed."
56+
echo "proxy_deployed=true" >> $GITHUB_OUTPUT
57+
exit 0
58+
fi
59+
60+
labels=$(gh pr view "$PR_NUMBER" --json labels --jq '.labels[].name')
61+
echo "Labels on PR #$PR_NUMBER: $labels"
62+
63+
if echo "$labels" | grep -Fxq 'deploy-proxy'; then
64+
echo "proxy_deployed=true" >> $GITHUB_OUTPUT
65+
else
66+
echo "proxy_deployed=false" >> $GITHUB_OUTPUT
67+
fi
68+
4769
- name: Run test - ${{ inputs.testType }}
70+
if: ${{ inputs.testType != 'e2e' || steps.check_proxy_deployed.outputs.proxy_deployed == 'true'}}
4871
shell: bash
4972
run: |
5073
make test-${{ inputs.testType }}

.github/scripts/dispatch_internal_repo_workflow.sh

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,6 @@ while [[ $# -gt 0 ]]; do
117117
extraSecretNames="$2"
118118
shift 2
119119
;;
120-
--testsToRun) # JSON array of test types to run, overriding test-types.json (optional)
121-
testsToRun="$2"
122-
shift 2
123-
;;
124120
*)
125121
echo "[ERROR] Unknown argument: $1"
126122
exit 1
@@ -223,10 +219,6 @@ if [[ -z "$extraSecretNames" ]]; then
223219
extraSecretNames=""
224220
fi
225221
226-
if [[ -z "$testsToRun" ]]; then
227-
testsToRun=""
228-
fi
229-
230222
echo "==================== Workflow Dispatch Parameters ===================="
231223
echo " infraRepoName: $infraRepoName"
232224
echo " releaseVersion: $releaseVersion"
@@ -266,7 +258,6 @@ DISPATCH_EVENT=$(jq -ncM \
266258
--arg targetDomain "$targetDomain" \
267259
--arg version "$version" \
268260
--argjson extraSecretNames "${extraSecretNames:-null}" \
269-
--argjson testsToRun "${testsToRun:-null}" \
270261
'{
271262
"ref": "'"$internalRef"'",
272263
"inputs": (
@@ -283,7 +274,6 @@ DISPATCH_EVENT=$(jq -ncM \
283274
(if $targetDomain != "" then { "targetDomain": $targetDomain } else {} end) +
284275
(if $version != "" then { "version": $version } else {} end) +
285276
(if $extraSecretNames != null then { "extraSecretNames": ($extraSecretNames | tojson) } else {} end) +
286-
(if $testsToRun != null then { "testsToRun": ($testsToRun | tojson) } else {} end) +
287277
(if $targetAccountGroup != "" then { "targetAccountGroup": $targetAccountGroup } else {} end) +
288278
{
289279
"releaseVersion": $releaseVersion,

.github/workflows/stage-4-acceptance.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,4 @@ jobs:
9090
--targetEnvironment "$ENVIRONMENT" \
9191
--targetAccountGroup "nhs-notify-supplier-api-dev" \
9292
--targetComponent "api" \
93-
--extraSecretNames '["INTERNAL_DEV_TEST_PEM","NON_PROD_API_KEY","STATUS_ENDPOINT_API_KEY"]' \
94-
--testsToRun "$TESTS_TO_RUN"
93+
--extraSecretNames '["INTERNAL_DEV_TEST_PEM","NON_PROD_API_KEY","STATUS_ENDPOINT_API_KEY"]'

0 commit comments

Comments
 (0)