Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ jobs:
RUN_REGRESSION_TESTS: true
REGRESSION_TEST_PRODUCT: PFP-AWS
FORWARD_CSOC_LOGS: false
DEPLOY_APIGEE: true
DEPLOY_APIGEE: false
ALLOW_NHS_NUMBER_OVERRIDE: true
secrets:
REGRESSION_TESTS_PEM: ${{ secrets.REGRESSION_TESTS_PEM }}
Expand Down
82 changes: 41 additions & 41 deletions .github/workflows/run_regression_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,44 +113,44 @@ jobs:
--regression_test_workflow_tag "${REGRESSION_TEST_WORKFLOW_TAG}"
fi

- name: Run Regression Testing Proxygen API
working-directory: scripts
env:
TARGET_ENVIRONMENT: ${{ inputs.ENVIRONMENT }}
VERSION_NUMBER: ${{ inputs.VERSION_NUMBER }}
GITHUB-TOKEN: ${{ steps.generate-token.outputs.token }}
run: |
if [[ "$TARGET_ENVIRONMENT" != "prod" && "$TARGET_ENVIRONMENT" != "ref" ]]; then
REGRESSION_TEST_REPO_TAG="v3.8.18" # 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
REGRESSION_TEST_WORKFLOW_TAG="v3.8.18" # This is the tag of the github workflow to run, usually the same as REGRESSION_TEST_REPO_TAG

if [[ -z "$REGRESSION_TEST_REPO_TAG" || -z "$REGRESSION_TEST_WORKFLOW_TAG" ]]; then
echo "Error: One or both tag variables are not set" >&2
exit 1
fi

# HELPER IF STATEMENT - It will automatically determine the correct Git URL to use based on the REGRESSION_TEST_WORKFLOW_TAG value
if [[ "$REGRESSION_TEST_WORKFLOW_TAG" =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
echo "REGRESSION_TEST_WORKFLOW_TAG is a version tag, using tag link"
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
else
echo "REGRESSION_TEST_WORKFLOW_TAG doesn't look like a version tag, using branch link"
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
fi

if [[ ! -f run_regression_tests.py ]]; then
echo "Error: run_regression_tests.py not found" >&2
exit 1
fi

poetry install
echo Running regression tests in the "$TARGET_ENVIRONMENT" environment
poetry run python -u run_regression_tests.py \
--env="$TARGET_ENVIRONMENT" \
--pr_label="$VERSION_NUMBER" \
--token=${{ steps.generate-token.outputs.token }} \
--is_called_from_github=true \
--product="PFP-PROXYGEN" \
--regression_test_repo_tag "${REGRESSION_TEST_REPO_TAG}" \
--regression_test_workflow_tag "${REGRESSION_TEST_WORKFLOW_TAG}"
fi
# - name: Run Regression Testing Proxygen API
# working-directory: scripts
# env:
# TARGET_ENVIRONMENT: ${{ inputs.ENVIRONMENT }}
# VERSION_NUMBER: ${{ inputs.VERSION_NUMBER }}
# GITHUB-TOKEN: ${{ steps.generate-token.outputs.token }}
# run: |
# if [[ "$TARGET_ENVIRONMENT" != "prod" && "$TARGET_ENVIRONMENT" != "ref" ]]; then
# REGRESSION_TEST_REPO_TAG="v3.8.18" # 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
# REGRESSION_TEST_WORKFLOW_TAG="v3.8.18" # This is the tag of the github workflow to run, usually the same as REGRESSION_TEST_REPO_TAG

# if [[ -z "$REGRESSION_TEST_REPO_TAG" || -z "$REGRESSION_TEST_WORKFLOW_TAG" ]]; then
# echo "Error: One or both tag variables are not set" >&2
# exit 1
# fi

# # HELPER IF STATEMENT - It will automatically determine the correct Git URL to use based on the REGRESSION_TEST_WORKFLOW_TAG value
# if [[ "$REGRESSION_TEST_WORKFLOW_TAG" =~ ^v([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then
# echo "REGRESSION_TEST_WORKFLOW_TAG is a version tag, using tag link"
# 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
# else
# echo "REGRESSION_TEST_WORKFLOW_TAG doesn't look like a version tag, using branch link"
# 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
# fi

# if [[ ! -f run_regression_tests.py ]]; then
# echo "Error: run_regression_tests.py not found" >&2
# exit 1
# fi

# poetry install
# echo Running regression tests in the "$TARGET_ENVIRONMENT" environment
# poetry run python -u run_regression_tests.py \
# --env="$TARGET_ENVIRONMENT" \
# --pr_label="$VERSION_NUMBER" \
# --token=${{ steps.generate-token.outputs.token }} \
# --is_called_from_github=true \
# --product="PFP-PROXYGEN" \
# --regression_test_repo_tag "${REGRESSION_TEST_REPO_TAG}" \
# --regression_test_workflow_tag "${REGRESSION_TEST_WORKFLOW_TAG}"
# fi
2 changes: 1 addition & 1 deletion .github/workflows/sam_release_code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ on:
type: string
DEPLOY_APIGEE:
type: boolean
default: true
default: false
MTLS_KEY:
type: string
required: true
Expand Down