Skip to content

Commit 83ecc4e

Browse files
[PRM-495] add e2e testing workflow
1 parent 3fc2976 commit 83ecc4e

File tree

2 files changed

+48
-34
lines changed

2 files changed

+48
-34
lines changed

.github/workflows/e2e.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: End to End Test
2+
3+
on:
4+
workflow_call:
5+
6+
workflow_dispatch:
7+
8+
9+
jobs:
10+
e2e:
11+
name: End to End Test
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout End to End
16+
uses: actions/checkout@v5
17+
with:
18+
repository: 'nhsconnect/prm-repo-e2e-tests'
19+
20+
- name: Setup Java
21+
uses: actions/setup-java@v4
22+
with:
23+
distribution: 'adopt'
24+
java-version: '21'
25+
26+
27+
- name: Configure AWS Credentials
28+
uses: aws-actions/configure-aws-credentials@v4
29+
with:
30+
# TODO might want a testing specific testing role
31+
role-to-assume: ${{ secrets.IAM_ROLE_ECR_HOLDING_ACCOUNT_READ_WRITE }}
32+
aws-region: ${{ var.AWS_REGION }}
33+
mask-aws-account-id: true
34+
35+
- name: Build
36+
run: |
37+
./gradlew build
38+
39+
- name: Run End to End tests
40+
with:
41+
env:
42+
NHS_ENVIRONMENT: dev
43+
AWS_REGION: ${{ var.AWS_REGION }}
44+
AWS_DEFAULT_REGION: ${{ var.AWS_REGION }}
45+
run: |
46+
./gradlew test --tests "uk.nhs.prm.e2etests.test.RepositoryE2ETest"

.github/workflows/ehr-repo-build-and-publish.yml

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -105,38 +105,6 @@ jobs:
105105

106106

107107
end_to_end_test:
108-
name: End to End Test
109-
runs-on: ubuntu-latest
108+
name: End to End
110109
needs: [deploy_infra]
111-
112-
steps:
113-
- name: Checkout End to End
114-
uses: actions/checkout@v5
115-
with:
116-
repository: 'nhsconnect/prm-repo-e2e-tests'
117-
118-
- name: Setup Java
119-
uses: actions/setup-java@v4
120-
with:
121-
distribution: 'adopt'
122-
java-version: '21'
123-
124-
- name: Setup Gradle
125-
uses: gradle/actions/setup-gradle@v3
126-
with:
127-
gradle-version: 8.9
128-
129-
- name: Configure AWS Credentials
130-
uses: aws-actions/configure-aws-credentials@v4
131-
with:
132-
role-to-assume: ${{ secrets.IAM_ROLE_ECR_HOLDING_ACCOUNT_READ_WRITE }}
133-
aws-region: ${{ var.AWS_REGION }}
134-
mask-aws-account-id: true
135-
136-
- name: Build
137-
run: |
138-
./gradlew build
139-
140-
- name: Run End to End tests
141-
run: |
142-
gradle test --tests "uk.nhs.prm.e2etests.test.RepositoryE2ETest"
110+
uses: ./.github/workflows/e2e.yml

0 commit comments

Comments
 (0)