|
9 | 9 | VERSION_NUMBER: |
10 | 10 | required: true |
11 | 11 | type: string |
12 | | - secrets: { } |
13 | 12 |
|
14 | 13 | jobs: |
15 | 14 | regression-tests: |
16 | | - runs-on: ubuntu-22.04 |
17 | | - steps: |
18 | | - - name: Checkout |
19 | | - uses: actions/checkout@v6 |
20 | | - with: |
21 | | - fetch-depth: 0 |
22 | | - |
23 | | - - name: Cache asdf |
24 | | - uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb |
25 | | - with: |
26 | | - path: | |
27 | | - ~/.asdf |
28 | | - key: ${{ runner.os }}-asdf-${{ hashFiles('**/.tool-versions') }} |
29 | | - restore-keys: | |
30 | | - ${{ runner.os }}-asdf- |
31 | | -
|
32 | | - - name: Install asdf tools |
33 | | - uses: asdf-vm/actions/install@b7bcd026f18772e44fe1026d729e1611cc435d47 |
34 | | - with: |
35 | | - asdf_branch: v0.15.0 |
36 | | - env: |
37 | | - PYTHON_CONFIGURE_OPTS: --enable-shared |
38 | | - |
39 | | - - name: Derive Python version from .tool-versions |
40 | | - run: | |
41 | | - PYTHON_VERSION=$(grep "^python" .tool-versions | sed 's/python //g') |
42 | | - echo "PYTHON_VERSION=$PYTHON_VERSION" >> $GITHUB_ENV |
43 | | -
|
44 | | - - name: setup python venv |
45 | | - uses: actions/checkout@v6 |
46 | | - - uses: actions/setup-python@v6 |
47 | | - with: |
48 | | - python-version: '${{ env.PYTHON_VERSION }}' |
49 | | - cache: 'poetry' # caching poetry dependencies |
50 | | - - run: poetry install |
51 | | - |
52 | | - - name: Run Regression Testing |
53 | | - working-directory: scripts |
54 | | - if: ${{ (inputs.ENVIRONMENT != 'prod') && (inputs.ENVIRONMENT != 'ref') }} |
55 | | - env: |
56 | | - TARGET_ENVIRONMENT: ${{ inputs.ENVIRONMENT }} |
57 | | - VERSION_NUMBER: ${{ inputs.VERSION_NUMBER }} |
58 | | - TESTS_TOKEN: ${{ secrets.REGRESSION_TESTS_PAT }} |
59 | | - run: | |
60 | | - echo Running regression tests in the "$TARGET_ENVIRONMENT" environment. |
61 | | - poetry run python run_regression_tests.py \ |
62 | | - --env="$TARGET_ENVIRONMENT" \ |
63 | | - --token="$TESTS_TOKEN" \ |
64 | | - --regression_test_repo_tag "$VERSION_NUMBER" |
| 15 | + if: ${{ inputs.ENVIRONMENT != 'prod' }} |
| 16 | + uses: NHSDigital/eligibility-signposting-api-regression-tests/.github/workflows/regression_tests.yml@main |
| 17 | + with: |
| 18 | + environment: ${{ inputs.ENVIRONMENT }} |
| 19 | + tags: "@regression" |
| 20 | + github_tag: ${{ inputs.VERSION_NUMBER }} |
0 commit comments