11name : FHIR API and Batch Automation - E2E Tests
22
33on :
4- workflow call :
4+ workflow_call :
55 inputs :
66 apigee_environment :
77 required : true
2525 required : true
2626 APIGEE_OTP_KEY :
2727 required : true
28+ CIS2_E2E_USERNAME :
29+ required : true
2830 STATUS_API_KEY :
2931 required : true
3032 workflow_dispatch :
@@ -127,11 +129,9 @@ jobs:
127129 fi
128130
129131 e2e-tests :
130- # TODO - test. Will we need further permissions for publishing test reports
131132 permissions :
132133 id-token : write
133- checks : write
134- contents : read
134+ contents : write
135135 runs-on : ubuntu-latest
136136 needs : [wait-for-deployment]
137137 environment : ${{ inputs.apigee_environment }}
@@ -206,7 +206,7 @@ jobs:
206206 echo "::add-mask::$token"
207207 echo "APIGEE_ACCESS_TOKEN=$token" >> $GITHUB_ENV
208208
209- - name : Run Pytest-BDD ${{ inputs.service_under_test }} tests for with the ${{ inputs.suite_to_run }} filter
209+ - name : Run Pytest-BDD ${{ inputs.service_under_test }} tests with the ${{ inputs.suite_to_run }} filter
210210 working-directory : tests/e2e_automation
211211 env :
212212 S3_env : ${{ inputs.sub_environment }}
@@ -231,17 +231,12 @@ jobs:
231231 MEDICUS_client_Id : ${{ secrets.MEDICUS_client_Id }}
232232 MEDICUS_client_Secret : ${{ secrets.MEDICUS_client_Secret }}
233233 aws_token_refresh : " False"
234- run : |
235- TEST_PATH=" ${{ inputs.service_under_test == 'batch ' && 'features/batchTest ' || inputs.service_under_test == 'fhir_api' && 'features/APITests' || 'features' }}"
236- TEST_FILTER="${{ inputs.suite_to_run == 'proxy_smoke' && 'Status_feature' || inputs.suite_to_run }}"
234+ TEST_PATH : ${{ inputs.service_under_test == 'batch' && 'features/batchTest' || inputs.service_under_test == 'fhir_api' && 'features/APITests' || 'features' }}
235+ TEST_FILTER : ${{ inputs.suite_to_run == 'proxy_smoke ' && 'Status_feature ' || inputs.suite_to_run }}
236+ run : poetry run pytest "$TEST_PATH" -m "$TEST_FILTER" --junitxml=output/test-results.xml --alluredir=output/allure-results
237237
238- poetry run pytest "$TEST_PATH" -m "$TEST_FILTER" --junitxml=output/test-results.xml --alluredir=output/allure-results
239-
240- # Might need to figure out if this needs to be in certain directory, and needs particular permissions
241- - name : Publish test results to GitHub UI
242- working-directory : tests/e2e_automation
238+ - uses : dorny/test-reporter@31a54ee7ebcacc03a09ea97a7e5465a47b84aea5
243239 if : always()
244- uses : dorny/test-reporter@31a54ee7ebcacc03a09ea97a7e5465a47b84aea5
245240 with :
246241 name : BDD Test Summary
247242 path : " **/output/test-results.xml"
0 commit comments