|
35 | 35 | required: true |
36 | 36 | type: string |
37 | 37 |
|
38 | | -jobs: |
39 | | -# environment-set-up: |
40 | | -# name: "Environment set up" |
41 | | -# runs-on: ubuntu-latest |
42 | | -# timeout-minutes: 5 |
43 | | -# steps: |
44 | | -# - name: "Checkout code" |
45 | | -# uses: actions/checkout@v5 |
46 | | -# - name: "Create infractructure" |
47 | | -# run: | |
48 | | -# echo "Creating infractructure..." |
49 | | -# - name: "Update database" |
50 | | -# run: | |
51 | | -# echo "Updating database..." |
52 | | -# - name: "Deploy application" |
53 | | -# run: | |
54 | | -# echo "Deploying application..." |
| 38 | +permissions: |
| 39 | + id-token: write |
| 40 | + contents: read |
55 | 41 |
|
56 | | - test-contract: |
57 | | - name: "Contract test" |
| 42 | +jobs: |
| 43 | + run-acceptance-tests: |
| 44 | + name: Run Acceptance Tests |
58 | 45 | runs-on: ubuntu-latest |
59 | | -# needs: environment-set-up |
60 | | - timeout-minutes: 10 |
61 | 46 | steps: |
62 | | - - name: "Checkout code" |
63 | | - uses: actions/checkout@v5 |
64 | | - - name: "Cache node_modules" |
65 | | - uses: actions/cache@v4 |
| 47 | + - uses: actions/checkout@v5.0.0 |
| 48 | + |
| 49 | + - name: "Use Node.js" |
| 50 | + uses: actions/setup-node@v6 |
66 | 51 | with: |
67 | | - path: | |
68 | | - **/node_modules |
69 | | - key: ${{ runner.os }}-node-${{ inputs.nodejs_version }}-${{ hashFiles('**/package-lock.json') }} |
70 | | - restore-keys: | |
71 | | - ${{ runner.os }}-node-${{ inputs.nodejs_version }}- |
72 | | - - name: "Run contract test" |
73 | | - run: | |
74 | | - make test-contract |
| 52 | + node-version: "${{ inputs.nodejs_version }}" |
| 53 | + registry-url: "https://npm.pkg.github.com" |
| 54 | + scope: "@nhsdigital" |
| 55 | + |
| 56 | + - name: Trigger Acceptance Tests |
| 57 | + shell: bash |
75 | 58 | env: |
76 | | - GITHUB_PACKAGES_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
77 | | - - name: "Save result" |
| 59 | + APP_PEM_FILE: ${{ secrets.APP_PEM_FILE }} |
| 60 | + APP_CLIENT_ID: ${{ secrets.APP_CLIENT_ID }} |
| 61 | + NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
78 | 62 | run: | |
79 | | - echo "Nothing to save" |
80 | | -
|
81 | | -# Environment-based tests should run from notify-internal repo, not in public repo |
82 | | -# test-security: |
83 | | -# name: "Security test" |
84 | | -# runs-on: ubuntu-latest |
85 | | -# needs: environment-set-up |
86 | | -# timeout-minutes: 10 |
87 | | -# steps: |
88 | | -# - name: "Checkout code" |
89 | | -# uses: actions/checkout@v5 |
90 | | -# - name: "Run security test" |
91 | | -# run: | |
92 | | -# make test-security |
93 | | -# - name: "Save result" |
94 | | -# run: | |
95 | | -# echo "Nothing to save" |
96 | | -# test-ui: |
97 | | -# name: "UI test" |
98 | | -# runs-on: ubuntu-latest |
99 | | -# needs: environment-set-up |
100 | | -# timeout-minutes: 10 |
101 | | -# steps: |
102 | | -# - name: "Checkout code" |
103 | | -# uses: actions/checkout@v5 |
104 | | -# - name: "Run UI test" |
105 | | -# run: | |
106 | | -# make test-ui |
107 | | -# - name: "Save result" |
108 | | -# run: | |
109 | | -# echo "Nothing to save" |
110 | | -# test-ui-performance: |
111 | | -# name: "UI performance test" |
112 | | -# runs-on: ubuntu-latest |
113 | | -# needs: environment-set-up |
114 | | -# timeout-minutes: 10 |
115 | | -# steps: |
116 | | -# - name: "Checkout code" |
117 | | -# uses: actions/checkout@v5 |
118 | | -# - name: "Run UI performance test" |
119 | | -# run: | |
120 | | -# make test-ui-performance |
121 | | -# - name: "Save result" |
122 | | -# run: | |
123 | | -# echo "Nothing to save" |
124 | | -# test-integration: |
125 | | -# name: "Integration test" |
126 | | -# runs-on: ubuntu-latest |
127 | | -# needs: environment-set-up |
128 | | -# timeout-minutes: 10 |
129 | | -# steps: |
130 | | -# - name: "Checkout code" |
131 | | -# uses: actions/checkout@v5 |
132 | | -# - name: "Run integration test" |
133 | | -# run: | |
134 | | -# make test-integration |
135 | | -# - name: "Save result" |
136 | | -# run: | |
137 | | -# echo "Nothing to save" |
138 | | -# test-accessibility: |
139 | | -# name: "Accessibility test" |
140 | | -# runs-on: ubuntu-latest |
141 | | -# needs: environment-set-up |
142 | | -# timeout-minutes: 10 |
143 | | -# steps: |
144 | | -# - name: "Checkout code" |
145 | | -# uses: actions/checkout@v5 |
146 | | -# - name: "Run accessibility test" |
147 | | -# run: | |
148 | | -# make test-accessibility |
149 | | -# - name: "Save result" |
150 | | -# run: | |
151 | | -# echo "Nothing to save" |
152 | | -# test-load: |
153 | | -# name: "Load test" |
154 | | -# runs-on: ubuntu-latest |
155 | | -# needs: environment-set-up |
156 | | -# timeout-minutes: 10 |
157 | | -# steps: |
158 | | -# - name: "Checkout code" |
159 | | -# uses: actions/checkout@v5 |
160 | | -# - name: "Run load tests" |
161 | | -# run: | |
162 | | -# make test-load |
163 | | -# - name: "Save result" |
164 | | -# run: | |
165 | | -# echo "Nothing to save" |
166 | | -# environment-tear-down: |
167 | | -# name: "Environment tear down" |
168 | | -# runs-on: ubuntu-latest |
169 | | -# needs: |
170 | | -# [ |
171 | | -# test-accessibility, |
172 | | -# test-contract, |
173 | | -# test-integration, |
174 | | -# test-load, |
175 | | -# test-security, |
176 | | -# test-ui-performance, |
177 | | -# test-ui, |
178 | | -# ] |
179 | | -# if: always() |
180 | | -# timeout-minutes: 5 |
181 | | -# steps: |
182 | | -# - name: "Checkout code" |
183 | | -# uses: actions/checkout@v5 |
184 | | -# - name: "Tear down environment" |
185 | | -# run: | |
186 | | -# echo "Tearing down environment..." |
| 63 | + .github/scripts/dispatch_internal_repo_workflow.sh \ |
| 64 | + --targetWorkflow "dispatch-contextual-tests-dynamic-env.yaml" \ |
| 65 | + --infraRepoName "nhs-notify-supplier-api" \ |
| 66 | + --releaseVersion "${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" \ |
| 67 | + --overrideProjectName "nhs" \ |
| 68 | + --targetEnvironment "pr${{ inputs.pr_number }}" \ |
| 69 | + --targetAccountGroup "nhs-notify-supplier-api-dev" \ |
| 70 | + --targetComponent "api" |
0 commit comments