@@ -67,30 +67,86 @@ jobs:
6767 env :
6868 PYTHON_CONFIGURE_OPTS : --enable-shared
6969
70- - name : Run Regression Testing
70+ - name : Run Regression Testing Non-Proxygen
7171 working-directory : scripts
7272 env :
7373 TARGET_ENVIRONMENT : ${{ inputs.ENVIRONMENT }}
7474 VERSION_NUMBER : ${{ inputs.VERSION_NUMBER }}
7575 GITHUB-TOKEN : ${{ steps.generate-token.outputs.token }}
7676 run : |
7777 if [[ "$TARGET_ENVIRONMENT" != "prod" && "$TARGET_ENVIRONMENT" != "ref" ]]; then
78- # this should be the tag of the tests you want to run
79- REGRESSION_TEST_REPO_TAG= v3.3.1
78+ REGRESSION_TEST_REPO_TAG="AEA-6037" # 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
79+ REGRESSION_TEST_WORKFLOW_TAG=" v3.6.1" # This is the tag of the github workflow to run, usually the same as REGRESSION_TEST_REPO_TAG
8080
81- # this should be the tag of the regression test workflow you want to run
82- # This will normally be the same as REGRESSION_TEST_REPO_TAG
83- REGRESSION_TEST_WORKFLOW_TAG=v3.3.1
81+ if [[ -z "$REGRESSION_TEST_REPO_TAG" || -z "$REGRESSION_TEST_WORKFLOW_TAG" ]]; then
82+ echo "Error: One or both tag variables are not set" >&2
83+ exit 1
84+ fi
85+
86+ # HELPER IF STATEMENT - It will automatically determine the correct Git URL to use based on the REGRESSION_TEST_WORKFLOW_TAG value
87+ if [[ "$REGRESSION_TEST_WORKFLOW_TAG" =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
88+ echo "REGRESSION_TEST_WORKFLOW_TAG is a version tag, using tag link"
89+ 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
90+ else
91+ echo "REGRESSION_TEST_WORKFLOW_TAG doesn't look like a version tag, using branch link"
92+ 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
93+ fi
94+
95+ if [[ ! -f run_regression_tests.py ]]; then
96+ echo "Error: run_regression_tests.py not found" >&2
97+ exit 1
98+ fi
99+
100+ poetry install
101+ echo Running regression tests in the "$TARGET_ENVIRONMENT" environment
102+ poetry run python -u run_regression_tests.py \
103+ --env="$TARGET_ENVIRONMENT" \
104+ --pr_label="$VERSION_NUMBER" \
105+ --token=${{ steps.generate-token.outputs.token }} \
106+ --is_called_from_github=true \
107+ --product=${{ inputs.REGRESSION_TEST_PRODUCT }} \
108+ --regression_test_repo_tag "${REGRESSION_TEST_REPO_TAG}" \
109+ --regression_test_workflow_tag "${REGRESSION_TEST_WORKFLOW_TAG}"
110+ fi
111+
112+ - name : Run Regression Testing Proxygen
113+ working-directory : scripts
114+ env :
115+ TARGET_ENVIRONMENT : ${{ inputs.ENVIRONMENT }}
116+ VERSION_NUMBER : ${{ inputs.VERSION_NUMBER }}
117+ GITHUB-TOKEN : ${{ steps.generate-token.outputs.token }}
118+ run : |
119+ if [[ "$TARGET_ENVIRONMENT" != "prod" && "$TARGET_ENVIRONMENT" != "ref" ]]; then
120+ REGRESSION_TEST_REPO_TAG="AEA-6037" # 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
121+ REGRESSION_TEST_WORKFLOW_TAG="v3.6.1" # This is the tag of the github workflow to run, usually the same as REGRESSION_TEST_REPO_TAG
122+
123+ if [[ -z "$REGRESSION_TEST_REPO_TAG" || -z "$REGRESSION_TEST_WORKFLOW_TAG" ]]; then
124+ echo "Error: One or both tag variables are not set" >&2
125+ exit 1
126+ fi
127+
128+ # HELPER IF STATEMENT - It will automatically determine the correct Git URL to use based on the REGRESSION_TEST_WORKFLOW_TAG value
129+ if [[ "$REGRESSION_TEST_WORKFLOW_TAG" =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
130+ echo "REGRESSION_TEST_WORKFLOW_TAG is a version tag, using tag link"
131+ 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
132+ else
133+ echo "REGRESSION_TEST_WORKFLOW_TAG doesn't look like a version tag, using branch link"
134+ 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
135+ fi
136+
137+ if [[ ! -f run_regression_tests.py ]]; then
138+ echo "Error: run_regression_tests.py not found" >&2
139+ exit 1
140+ fi
84141
85- 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
86142 poetry install
87143 echo Running regression tests in the "$TARGET_ENVIRONMENT" environment
88144 poetry run python -u run_regression_tests.py \
89145 --env="$TARGET_ENVIRONMENT" \
90146 --pr_label="$VERSION_NUMBER" \
91147 --token=${{ steps.generate-token.outputs.token }} \
92148 --is_called_from_github=true \
93- --product ${{ inputs.REGRESSION_TEST_PRODUCT }} \
149+ --product="PFP-PROXYGEN" \
94150 --regression_test_repo_tag "${REGRESSION_TEST_REPO_TAG}" \
95151 --regression_test_workflow_tag "${REGRESSION_TEST_WORKFLOW_TAG}"
96152 fi
0 commit comments