Skip to content

Commit b9f6803

Browse files
merge
2 parents a756a7d + ded557b commit b9f6803

79 files changed

Lines changed: 18358 additions & 16386 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env.template

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,26 @@
1-
PR_NUMBER=prxx # remove if needs to run against main
2-
GITHUB_TOKEN= # Your github Personal Access Token (PAT)
1+
# Your github Personal Access Token (PAT)
2+
GITHUB_TOKEN=
33

4+
# Apigee proxy name to be used for test execution
5+
# nhs-notify-supplier--internal-dev--nhs-notify-supplier-PR-XX
6+
PROXY_NAME=
47

5-
# The variables below are used for End to End tests
6-
PROXY_NAME= # information about the proxy name can be found in the tests/e2e-tests/README.md
8+
# APIM env to run e2e tests against, other options are: ref, int, prod
9+
API_ENVIRONMENT=internal-dev
710

11+
# Used for component and e2e tests
12+
# Account group controls default account id mapping for tests.
13+
# If omitted, tests default to dev:
14+
# TARGET_ACCOUNT_GROUP=nhs-notify-supplier-api-dev
15+
# Mapping used by tests:
16+
# nhs-notify-supplier-api-dev -> 820178564574
17+
# nhs-notify-supplier-api-nonprod -> 885964308133
18+
# nhs-notify-supplier-api-prod -> blocked (tests are intentionally disabled for prod)
19+
TARGET_ACCOUNT_GROUP=nhs-notify-supplier-api-dev
820

9-
10-
# * nhs-notify-supplier--internal-dev--nhs-notify-supplier
11-
# * nhs-notify-supplier--internal-dev--nhs-notify-supplier-PR-XX
12-
# * nhs-notify-supplier--ref--nhs-notify-supplier -- ref env
21+
# Resource namespace used to resolve AWS resource names for tests (main, pr123)
22+
# remove if needs to run against main
23+
TARGET_ENVIRONMENT=prxx
1324

1425
# API Keys
1526
# ========
@@ -25,9 +36,9 @@ export STATUS_ENDPOINT_API_KEY=xxx
2536

2637
# Private Keys
2738
# ============
28-
# private key used to generate authentication for tests ran against the internal-dev and internal-qa
29-
export NON_PROD_PRIVATE_KEY=xxx # path to the private key file
30-
# private key used to generate authentication for tests ran against the int environment
39+
# private key path used to generate authentication for tests ran against the internal-dev and internal-qa
40+
export NON_PROD_PRIVATE_KEY=xxx
41+
# private key path used to generate authentication for tests ran against the int environment
3142
export INTEGRATION_PRIVATE_KEY=xxx
32-
# private key used to generate authentication for tests ran against the prod environment
43+
# private key path used to generate authentication for tests ran against the prod environment
3344
export PRODUCTION_PRIVATE_KEY=xxx

.github/actions/acceptance-tests-component/action.yml renamed to .github/actions/acceptance-tests-components/action.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ inputs:
1414
description: Name of the component under test
1515
required: true
1616

17+
targetAccountGroup:
18+
description: Name of the account group under test (e.g. nhs-notify-supplier-api-dev)
19+
required: true
20+
1721
runs:
1822
using: "composite"
1923

@@ -39,5 +43,6 @@ runs:
3943
shell: bash
4044
env:
4145
TARGET_ENVIRONMENT: ${{ inputs.targetEnvironment }}
46+
TARGET_ACCOUNT_GROUP: ${{ inputs.targetAccountGroup }}
4247
run: |
4348
make test-${{ inputs.testType }}

.github/actions/acceptance-tests-e2e/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ inputs:
55
targetEnvironment:
66
description: Name of the environment under test
77
required: true
8+
targetAccountGroup:
9+
description: Name of the account group under test
10+
required: true
811

912
runs:
1013
using: "composite"
@@ -65,6 +68,7 @@ runs:
6568
env:
6669
TARGET_ENVIRONMENT: ${{ inputs.targetEnvironment }}
6770
PR_NUMBER: ${{ steps.set_pr_number.outputs.pr_number }}
71+
TARGET_ACCOUNT_GROUP: ${{ inputs.targetAccountGroup }}
6872
run: |
6973
echo "$DEV_E2E_KEYS_PRIVATE" > "${GITHUB_WORKSPACE}/internal-dev-test-1.pem"
7074
chmod 600 "${GITHUB_WORKSPACE}/internal-dev-test-1.pem"

.github/actions/acceptance-tests/action.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ inputs:
1111
required: true
1212

1313
targetAccountGroup:
14-
description: Name of the account group under test
15-
default: nhs-notify-template-management-dev
14+
description: Name of the account group under test (e.g. nhs-notify-supplier-api-dev)
1615
required: true
1716

1817
targetComponent:
@@ -24,16 +23,18 @@ runs:
2423

2524
steps:
2625

27-
- name: Run component tests
26+
- name: Run components tests (sandbox and component tests)
2827
if: ${{ inputs.testType != 'e2e' }}
29-
uses: ./.github/actions/acceptance-tests-component
28+
uses: ./.github/actions/acceptance-tests-components
3029
with:
3130
testType: ${{ inputs.testType }}
3231
targetEnvironment: ${{ inputs.targetEnvironment }}
3332
targetComponent: ${{ inputs.targetComponent }}
33+
targetAccountGroup: ${{ inputs.targetAccountGroup }}
3434

3535
- name: Run e2e tests
36-
if: ${{ inputs.testType == 'e2e' && inputs.targetEnvironment == 'main' }}
36+
if: ${{ inputs.testType == 'e2e' }}
3737
uses: ./.github/actions/acceptance-tests-e2e
3838
with:
3939
targetEnvironment: ${{ inputs.targetEnvironment }}
40+
targetAccountGroup: ${{ inputs.targetAccountGroup }}

.github/workflows/cicd-1-pull-request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
deploy_proxy: ${{ steps.deploy_proxy.outputs.deploy_proxy }}
3434
steps:
3535
- name: "Checkout code"
36-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
36+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3737
- name: "Set CI/CD variables"
3838
id: variables
3939
run: |

.github/workflows/cicd-4-pr-title-check.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,6 @@ jobs:
1515
runs-on: ubuntu-latest
1616
steps:
1717
- name: "Check PR title format"
18-
uses: NHSDigital/nhs-notify-shared-modules/.github/actions/check-pr-title-format@4.0.0
18+
uses: NHSDigital/nhs-notify-shared-modules/.github/actions/check-pr-title-format@5be2f2e952a6f439fb673e04aac5f5b7afcc2c2f # 4.0.1
1919
with:
2020
title: ${{ github.event.pull_request.title }}

.github/workflows/deploy-dynamic-env-proxy.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ jobs:
2929

3030
- name: Resolve nodejs version
3131
id: toolversions
32-
run: echo "nodejs_version=$(grep '^nodejs\s' .tool-versions | cut -f2 -d' ')" >>
32+
run:
33+
echo "nodejs_version=$(grep '^nodejs\s' .tool-versions | cut -f2 -d' ')" >>
3334
"$GITHUB_OUTPUT"
3435

3536
- name: "Check if pull request exists for this branch and set

.github/workflows/pr_closed.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ jobs:
5656
packages: read
5757
steps:
5858
- name: Checkout code
59-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
59+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
6060
- name: Setup NodeJS
61-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
61+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
6262
with:
6363
node-version-file: ".tool-versions"
6464
registry-url: "https://npm.pkg.github.com"
@@ -92,7 +92,7 @@ jobs:
9292
packages: read
9393
steps:
9494
- name: "Checkout code"
95-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
95+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
9696
- name: "Repo setup"
9797
uses: ./.github/actions/node-install
9898
with:
@@ -115,9 +115,9 @@ jobs:
115115

116116
steps:
117117
- name: Checkout code
118-
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
118+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
119119
- name: Setup NodeJS
120-
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
120+
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
121121
with:
122122
node-version-file: ".tool-versions"
123123
registry-url: "https://npm.pkg.github.com"

.github/workflows/pr_destroy_dynamic_env.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
runs-on: ubuntu-latest
2121

2222
steps:
23-
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
23+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2424

2525
- name: Trigger dynamic environment destruction
2626
env:
@@ -44,7 +44,7 @@ jobs:
4444
runs-on: ubuntu-latest
4545

4646
steps:
47-
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
47+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
4848

4949
- name: Trigger dynamic proxy destruction
5050
env:

.github/workflows/scheduled-repository-template-sync.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ jobs:
1616

1717
steps:
1818
- name: Check out the repository
19-
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5
19+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2020
- name: Sync repository template
21-
uses: NHSDigital/nhs-notify-shared-modules/.github/actions/sync-template-repo@4.0.0
21+
uses: NHSDigital/nhs-notify-shared-modules/.github/actions/sync-template-repo@5be2f2e952a6f439fb673e04aac5f5b7afcc2c2f # v4.0.1
2222
with:
2323
github_token: ${{ github.token }}
2424

2525
- name: Create Pull Request
2626
if: ${{ !env.ACT }}
27-
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
27+
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
2828
with:
2929
token: ${{ secrets.GITHUB_TOKEN }}
3030
commit-message: Drift from template

0 commit comments

Comments
 (0)