@@ -40,25 +40,30 @@ jobs:
4040 owner : " NHSDigital"
4141 repositories : " electronic-prescription-service-api-regression-tests"
4242
43+ # using git commit sha for version of action to ensure we have stable version
44+ - name : Get asdf version
45+ id : asdf-version
46+ run : echo "version=$(awk '!/^#/ && NF {print $1; exit}' .tool-versions.asdf)" >> "$GITHUB_OUTPUT"
47+
4348 # using git commit sha for version of action to ensure we have stable version
4449 - name : Install asdf
4550 uses : asdf-vm/actions/setup@1902764435ca0dd2f3388eea723a4f92a4eb8302
4651 with :
47- asdf_branch : v0.11.3
52+ asdf_version : ${{ steps.asdf-version.outputs.version }}
4853
4954 - name : Cache asdf
5055 uses : actions/cache@v4
5156 with :
5257 path : |
5358 ~/.asdf
54- key : ${{ runner.os }}-asdf-${{ hashFiles('**/.tool-versions') }}
59+ key : ${{ runner.os }}-asdf-${{ hashFiles('**/.tool-versions') }}-${{ steps.asdf-version.outputs.version }}
5560 restore-keys : |
56- ${{ runner.os }}-asdf-
61+ ${{ runner.os }}-asdf-${{ hashFiles('**/.tool-versions') }}-${{ steps.asdf-version.outputs.version }}
5762
5863 - name : Install asdf dependencies in .tool-versions
5964 uses : asdf-vm/actions/install@1902764435ca0dd2f3388eea723a4f92a4eb8302
6065 with :
61- asdf_branch : v0.11.3
66+ asdf_version : ${{ steps.asdf-version.outputs.version }}
6267 env :
6368 PYTHON_CONFIGURE_OPTS : --enable-shared
6469
@@ -69,23 +74,23 @@ jobs:
6974 VERSION_NUMBER : ${{ inputs.VERSION_NUMBER }}
7075 GITHUB-TOKEN : ${{ steps.generate-token.outputs.token }}
7176 run : |
72- if [[ "$TARGET_ENVIRONMENT" != "prod" && "$TARGET_ENVIRONMENT" != "ref" ]]; then
73- # this should be the tag of the tests you want to run
74- REGRESSION_TEST_REPO_TAG=v3.3.1
77+ 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
7580
76- # this should be the tag of the regression test workflow you want to run
77- # This will normally be the same as REGRESSION_TEST_REPO_TAG
78- REGRESSION_TEST_WORKFLOW_TAG=v3.3.1
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
7984
80- 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
81- poetry install
82- echo Running regression tests in the "$TARGET_ENVIRONMENT" environment
83- poetry run python -u run_regression_tests.py \
84- --env="$TARGET_ENVIRONMENT" \
85- --pr_label="$VERSION_NUMBER" \
86- --token=${{ steps.generate-token.outputs.token }} \
87- --is_called_from_github=true \
88- --product ${{ inputs.REGRESSION_TEST_PRODUCT }} \
89- --regression_test_repo_tag "${REGRESSION_TEST_REPO_TAG}" \
90- --regression_test_workflow_tag "${REGRESSION_TEST_WORKFLOW_TAG}"
91- fi
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
86+ poetry install
87+ echo Running regression tests in the "$TARGET_ENVIRONMENT" environment
88+ poetry run python -u run_regression_tests.py \
89+ --env="$TARGET_ENVIRONMENT" \
90+ --pr_label="$VERSION_NUMBER" \
91+ --token=${{ steps.generate-token.outputs.token }} \
92+ --is_called_from_github=true \
93+ --product ${{ inputs.REGRESSION_TEST_PRODUCT }} \
94+ --regression_test_repo_tag "${REGRESSION_TEST_REPO_TAG}" \
95+ --regression_test_workflow_tag "${REGRESSION_TEST_WORKFLOW_TAG}"
96+ fi
0 commit comments