@@ -113,44 +113,44 @@ jobs:
113113 --regression_test_workflow_tag "${REGRESSION_TEST_WORKFLOW_TAG}"
114114 fi
115115
116- # - name: Run Regression Testing Proxygen API
117- # working-directory: scripts
118- # env:
119- # TARGET_ENVIRONMENT: ${{ inputs.ENVIRONMENT }}
120- # VERSION_NUMBER: ${{ inputs.VERSION_NUMBER }}
121- # GITHUB-TOKEN: ${{ steps.generate-token.outputs.token }}
122- # run: |
123- # if [[ "$TARGET_ENVIRONMENT" != "prod" && "$TARGET_ENVIRONMENT" != "ref" ]]; then
124- # REGRESSION_TEST_REPO_TAG="v3.8.19" # This is the tag or branch of the regression test code to run, usually a version tag like v3.1.0 or a branch name
125- # REGRESSION_TEST_WORKFLOW_TAG="v3.8.19" # This is the tag of the github workflow to run, usually the same as REGRESSION_TEST_REPO_TAG
126-
127- # if [[ -z "$REGRESSION_TEST_REPO_TAG" || -z "$REGRESSION_TEST_WORKFLOW_TAG" ]]; then
128- # echo "Error: One or both tag variables are not set" >&2
129- # exit 1
130- # fi
131-
132- # # HELPER IF STATEMENT - It will automatically determine the correct Git URL to use based on the REGRESSION_TEST_WORKFLOW_TAG value
133- # if [[ "$REGRESSION_TEST_WORKFLOW_TAG" =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
134- # echo "REGRESSION_TEST_WORKFLOW_TAG is a version tag, using tag link"
135- # curl "https://raw.githubusercontent.com/NHSDigital/electronic-prescription-service-api-regression-tests/refs/tags/${REGRESSION_TEST_WORKFLOW_TAG}/scripts/run_regression_tests.py" -o run_regression_tests.py
136- # else
137- # echo "REGRESSION_TEST_WORKFLOW_TAG doesn't look like a version tag, using branch link"
138- # curl "https://raw.githubusercontent.com/NHSDigital/electronic-prescription-service-api-regression-tests/refs/heads/${REGRESSION_TEST_REPO_TAG}/scripts/run_regression_tests.py" -o run_regression_tests.py
139- # fi
140-
141- # if [[ ! -f run_regression_tests.py ]]; then
142- # echo "Error: run_regression_tests.py not found" >&2
143- # exit 1
144- # fi
145-
146- # poetry install
147- # echo Running regression tests in the "$TARGET_ENVIRONMENT" environment
148- # poetry run python -u run_regression_tests.py \
149- # --env="$TARGET_ENVIRONMENT" \
150- # --pr_label="$VERSION_NUMBER" \
151- # --token=${{ steps.generate-token.outputs.token }} \
152- # --is_called_from_github=true \
153- # --product="PFP-PROXYGEN" \
154- # --regression_test_repo_tag "${REGRESSION_TEST_REPO_TAG}" \
155- # --regression_test_workflow_tag "${REGRESSION_TEST_WORKFLOW_TAG}"
156- # fi
116+ - name : Run Regression Testing Proxygen API
117+ working-directory : scripts
118+ env :
119+ TARGET_ENVIRONMENT : ${{ inputs.ENVIRONMENT }}
120+ VERSION_NUMBER : ${{ inputs.VERSION_NUMBER }}
121+ GITHUB-TOKEN : ${{ steps.generate-token.outputs.token }}
122+ run : |
123+ if [[ "$TARGET_ENVIRONMENT" != "prod" && "$TARGET_ENVIRONMENT" != "ref" ]]; then
124+ REGRESSION_TEST_REPO_TAG="v3.8.19" # This is the tag or branch of the regression test code to run, usually a version tag like v3.1.0 or a branch name
125+ REGRESSION_TEST_WORKFLOW_TAG="v3.8.19" # This is the tag of the github workflow to run, usually the same as REGRESSION_TEST_REPO_TAG
126+
127+ if [[ -z "$REGRESSION_TEST_REPO_TAG" || -z "$REGRESSION_TEST_WORKFLOW_TAG" ]]; then
128+ echo "Error: One or both tag variables are not set" >&2
129+ exit 1
130+ fi
131+
132+ # HELPER IF STATEMENT - It will automatically determine the correct Git URL to use based on the REGRESSION_TEST_WORKFLOW_TAG value
133+ if [[ "$REGRESSION_TEST_WORKFLOW_TAG" =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
134+ echo "REGRESSION_TEST_WORKFLOW_TAG is a version tag, using tag link"
135+ curl "https://raw.githubusercontent.com/NHSDigital/electronic-prescription-service-api-regression-tests/refs/tags/${REGRESSION_TEST_WORKFLOW_TAG}/scripts/run_regression_tests.py" -o run_regression_tests.py
136+ else
137+ echo "REGRESSION_TEST_WORKFLOW_TAG doesn't look like a version tag, using branch link"
138+ curl "https://raw.githubusercontent.com/NHSDigital/electronic-prescription-service-api-regression-tests/refs/heads/${REGRESSION_TEST_REPO_TAG}/scripts/run_regression_tests.py" -o run_regression_tests.py
139+ fi
140+
141+ if [[ ! -f run_regression_tests.py ]]; then
142+ echo "Error: run_regression_tests.py not found" >&2
143+ exit 1
144+ fi
145+
146+ poetry install
147+ echo Running regression tests in the "$TARGET_ENVIRONMENT" environment
148+ poetry run python -u run_regression_tests.py \
149+ --env="$TARGET_ENVIRONMENT" \
150+ --pr_label="$VERSION_NUMBER" \
151+ --token=${{ steps.generate-token.outputs.token }} \
152+ --is_called_from_github=true \
153+ --product="PFP-PROXYGEN" \
154+ --regression_test_repo_tag "${REGRESSION_TEST_REPO_TAG}" \
155+ --regression_test_workflow_tag "${REGRESSION_TEST_WORKFLOW_TAG}"
156+ fi
0 commit comments