Skip to content
Merged
Changes from 1 commit
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
56 changes: 6 additions & 50 deletions .github/workflows/regression-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,56 +9,12 @@ on:
VERSION_NUMBER:
required: true
type: string
secrets: { }

jobs:
regression-tests:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Cache asdf
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb
with:
path: |
~/.asdf
key: ${{ runner.os }}-asdf-${{ hashFiles('**/.tool-versions') }}
restore-keys: |
${{ runner.os }}-asdf-

- name: Install asdf tools
uses: asdf-vm/actions/install@b7bcd026f18772e44fe1026d729e1611cc435d47
with:
asdf_branch: v0.15.0
env:
PYTHON_CONFIGURE_OPTS: --enable-shared

- name: Derive Python version from .tool-versions
run: |
PYTHON_VERSION=$(grep "^python" .tool-versions | sed 's/python //g')
echo "PYTHON_VERSION=$PYTHON_VERSION" >> $GITHUB_ENV

- name: setup python venv
uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: '${{ env.PYTHON_VERSION }}'
cache: 'poetry' # caching poetry dependencies
- run: poetry install

- name: Run Regression Testing
working-directory: scripts
if: ${{ (inputs.ENVIRONMENT != 'prod') && (inputs.ENVIRONMENT != 'ref') }}
env:
TARGET_ENVIRONMENT: ${{ inputs.ENVIRONMENT }}
VERSION_NUMBER: ${{ inputs.VERSION_NUMBER }}
TESTS_TOKEN: ${{ secrets.REGRESSION_TESTS_PAT }}
run: |
echo Running regression tests in the "$TARGET_ENVIRONMENT" environment.
poetry run python run_regression_tests.py \
--env="$TARGET_ENVIRONMENT" \
--token="$TESTS_TOKEN" \
--regression_test_repo_tag "$VERSION_NUMBER"
if: ${{ (inputs.ENVIRONMENT != 'prod') && (inputs.ENVIRONMENT != 'ref') }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand why not prod but why not ref?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ohh wait are you just making sure people dont put ref when they mean preprod?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good spot, amended

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, i copied the 'ref' reference from the old code, it looks to be 'defensive' but we don't actually pass ref at any point as the environment. So removing the ref/preprod entirely

uses: NHSDigital/eligibility-signposting-api-regression-tests/.github/workflows/regression_tests.yml@main
with:
environment: ${{ inputs.ENVIRONMENT }}
tags: "@regression"
github_tag: ${{ inputs.VERSION_NUMBER }}
Loading