Skip to content

Commit 611e304

Browse files
committed
Add expected_commit_id input to E2E test workflow for improved commit tracking
1 parent e18d510 commit 611e304

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

.github/workflows/pr-deploy-and-test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ jobs:
4848
sub_environment: pr-${{github.event.pull_request.number}}
4949
service_under_test: all
5050
suite_to_run: ${{ matrix.required_test_suite }}
51+
expected_commit_id: ${{ github.event.pull_request.head.sha }}
5152
secrets:
5253
APIGEE_PASSWORD: ${{ secrets.APIGEE_PASSWORD }}
5354
APIGEE_BASIC_AUTH_TOKEN: ${{ secrets.APIGEE_BASIC_AUTH_TOKEN }}

.github/workflows/run-e2e-automation-tests.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ on:
1818
suite_to_run:
1919
required: true
2020
type: string
21+
expected_commit_id:
22+
required: false
23+
type: string
24+
default: ""
2125
secrets:
2226
APIGEE_PASSWORD:
2327
required: true
@@ -72,6 +76,11 @@ on:
7276
description: Set to true if you want the MNS validation to be performed as part of the tests. please keep in mind it will increase execution time.
7377
default: false
7478
type: boolean
79+
expected_commit_id:
80+
description: Optional commit SHA expected from the deployed _status endpoint.
81+
required: false
82+
type: string
83+
default: ""
7584

7685
env:
7786
APIGEE_AUTH_ENV: ${{ inputs.apigee_environment == 'int' && inputs.apigee_environment || 'internal-dev' }}
@@ -81,7 +90,7 @@ env:
8190
SERVICE_BASE_PATH: ${{ startsWith(inputs.sub_environment, 'pr-') && format('immunisation-fhir-api/FHIR/R4-{0}', inputs.sub_environment) || 'immunisation-fhir-api/FHIR/R4' }}
8291
PROXY_NAME: ${{ startsWith(inputs.sub_environment, 'pr-') && format('immunisation-fhir-api-{0}', inputs.sub_environment) || format('immunisation-fhir-api-{0}', inputs.apigee_environment) }}
8392
STATUS_API_KEY: ${{ secrets.STATUS_API_KEY }}
84-
SOURCE_COMMIT_ID: ${{ github.sha }}
93+
SOURCE_COMMIT_ID: ${{ inputs.expected_commit_id || github.sha }}
8594
MNS_VALIDATION_REQUIRED: ${{ inputs.mns_validation_required || startsWith(inputs.sub_environment, 'pr-') || inputs.apigee_environment == 'internal-dev' }}
8695

8796
jobs:

0 commit comments

Comments
 (0)