Skip to content
Merged
Changes from 3 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
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 != 'preprod') }}
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