-
Notifications
You must be signed in to change notification settings - Fork 2
100 lines (92 loc) · 3.21 KB
/
stage-4-acceptance.yaml
File metadata and controls
100 lines (92 loc) · 3.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: "Acceptance stage"
on:
workflow_call:
inputs:
build_datetime:
description: "Build datetime, set by the CI/CD pipeline workflow"
required: true
type: string
build_timestamp:
description: "Build timestamp, set by the CI/CD pipeline workflow"
required: true
type: string
build_epoch:
description: "Build epoch, set by the CI/CD pipeline workflow"
required: true
type: string
nodejs_version:
description: "Node.js version, set by the CI/CD pipeline workflow"
required: true
type: string
python_version:
description: "Python version, set by the CI/CD pipeline workflow"
required: true
type: string
terraform_version:
description: "Terraform version, set by the CI/CD pipeline workflow"
required: true
type: string
version:
description: "Version of the software, set by the CI/CD pipeline workflow"
required: true
type: string
pr_number:
required: true
type: string
proxy_deployed:
description: "True if the APIM proxy was deployed"
required: true
type: string
permissions:
id-token: write
contents: read
jobs:
run-acceptance-tests:
name: Run Acceptance Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: "Use Node.js"
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6
with:
node-version: "${{ inputs.nodejs_version }}"
registry-url: "https://npm.pkg.github.com"
scope: "@nhsdigital"
- name: "Set environment"
shell: bash
run: |
if [ "${{ inputs.pr_number }}" != "" ]; then
echo "ENVIRONMENT=pr${{ inputs.pr_number }}" >> $GITHUB_ENV
else
echo "ENVIRONMENT=main" >> $GITHUB_ENV
fi
- name: Trigger Acceptance Tests
shell: bash
env:
APP_PEM_FILE: ${{ secrets.APP_PEM_FILE }}
APP_CLIENT_ID: ${{ secrets.APP_CLIENT_ID }}
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
.github/scripts/dispatch_internal_repo_workflow.sh \
--targetWorkflow "dispatch-contextual-tests-dynamic-env.yaml" \
--infraRepoName "nhs-notify-supplier-api" \
--releaseVersion "${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" \
--overrideProjectName "nhs" \
--targetEnvironment "$ENVIRONMENT" \
--targetAccountGroup "nhs-notify-supplier-api-dev" \
--targetComponent "api"
run-e2e-tests:
name: Run End-to-End Tests
runs-on: ubuntu-latest
if: inputs.proxy_deployed == 'true'
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: "Run e2e tests"
#uses: ./.github/actions/e2e-tests
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NON_PROD_API_KEY: ${{ secrets.NON_PROD_API_KEY }}
INTERNAL_DEV_TEST_PEM: ${{ secrets.INTERNAL_DEV_TEST_PEM }}
shell: bash
run: |
echo "E2E tests are currently disabled. See CCM-14778"