-
Notifications
You must be signed in to change notification settings - Fork 1
239 lines (226 loc) · 7.5 KB
/
test.yml
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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
name: Test
on:
push:
branches-ignore:
- "main"
tags-ignore:
- "**"
jobs:
run-adminUi-checks:
runs-on: ubuntu-latest
name: Run Admin UI Checks
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Run Checks
run: ./.ci/runAdminUiChecks.sh
check-formatting:
runs-on: ubuntu-latest
name: Check Formatting
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install script dependencies
run: npm install --prefix ./.ci
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.0.x"
- name: Check formatting
run: ./.ci/checkFormatting.js
test:
runs-on: ubuntu-latest
name: Run Tests
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install script dependencies
run: npm install --prefix ./.ci
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: "8.0.x"
- name: Run tests
run: ./.ci/test.js
integration-test-sqlserver:
name: Run Integration Tests (on SQL Server)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install script dependencies
run: npm install --prefix ./.ci
- name: Run integration tests
run: ./.ci/integrationTest.sqlserver.sh
- name: Save Docker Logs
if: failure()
run: docker compose -f ./.ci/docker-compose.test.yml -f ./.ci/docker-compose.test.sqlserver.yml logs > docker-log.txt
- name: Archive logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: integration-test-sqlserver-docker-logs
path: docker-log.txt
integration-test-postgres:
name: Run Integration Tests (on Postgres)
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install script dependencies
run: npm install --prefix ./.ci
- name: Run integration tests
run: ./.ci/integrationTest.postgres.sh
- name: Save Docker Logs
if: failure()
run: docker compose -f ./.ci/docker-compose.test.yml -f ./.ci/docker-compose.test.postgres.yml logs > docker-log.txt
- name: Archive logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: integration-test-postgres-docker-logs
path: docker-log.txt
cns-transport-test-sqlserver:
name: Run cns-transport Tests (on SQL Server)
runs-on: ubuntu-latest
steps:
- name: Checkout backbone repository
uses: actions/checkout@v4
with:
path: backbone
- name: Checkout cns-transport repository
uses: actions/checkout@v4
with:
repository: nmshd/cns-transport
path: cns-transport
- name: Run Consumer API
run: docker compose -f ./backbone/.ci/docker-compose.test.yml -f ./backbone/.ci/docker-compose.test.sqlserver.yml up -d
- name: Install cns-transport dependencies
working-directory: ./cns-transport
run: npm install
- name: Run cns-transport Tests
working-directory: ./cns-transport
env:
NMSHD_TEST_BASEURL: http://localhost:5000
NMSHD_TEST_CLIENTID: test
NMSHD_TEST_CLIENTSECRET: test
run: npm run test:local:lokijs
- name: Save Docker Logs
if: failure()
run: docker compose -f ./backbone/.ci/docker-compose.test.yml -f ./backbone/.ci/docker-compose.test.sqlserver.yml logs > docker-log.txt
- name: Archive logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: cns-transport-test-sqlserver-docker-logs
path: docker-log.txt
- name: Stop Consumer API
run: docker compose -f ./backbone/.ci/docker-compose.test.yml -f ./backbone/.ci/docker-compose.test.sqlserver.yml down
cns-transport-test-postgres:
name: Run cns-transport Tests (on Postgres)
runs-on: ubuntu-latest
steps:
- name: Checkout backbone repository
uses: actions/checkout@v4
with:
path: backbone
- name: Checkout cns-transport repository
uses: actions/checkout@v4
with:
repository: nmshd/cns-transport
path: cns-transport
- name: Run Consumer API
run: docker compose -f ./backbone/.ci/docker-compose.test.yml -f ./backbone/.ci/docker-compose.test.postgres.yml up -d
- name: Install cns-transport dependencies
working-directory: ./cns-transport
run: npm install
- name: Run cns-transport Tests
working-directory: ./cns-transport
env:
NMSHD_TEST_BASEURL: http://localhost:5000
NMSHD_TEST_CLIENTID: test
NMSHD_TEST_CLIENTSECRET: test
run: npm run test:local:lokijs
- name: Save Docker Logs
if: failure()
run: docker compose -f ./backbone/.ci/docker-compose.test.yml -f ./backbone/.ci/docker-compose.test.postgres.yml logs > docker-log.txt
- name: Archive logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: cns-transport-test-postgres-docker-logs
path: docker-log.txt
- name: Stop Consumer API
run: docker compose -f ./backbone/.ci/docker-compose.test.yml -f ./backbone/.ci/docker-compose.test.postgres.yml down
build-helm-chart:
name: Build Helm Chart
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install script dependencies
run: npm install --prefix ./.ci
- name: Build Helm Chart
run: ./.ci/helm/buildChart.js
env:
VERSION: 0.0.0
build-capi-container-image:
name: Build Consumer API Container Image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install script dependencies
run: npm install --prefix ./.ci
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build image
run: ./.ci/capi/buildContainerImage.js
env:
TAG: test
PLATFORMS: linux/amd64
build-aui-container-image:
name: Build Admin UI Container Image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install script dependencies
run: npm install --prefix ./.ci
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build image
run: ./.ci/aui/buildContainerImage.js
env:
TAG: test
PLATFORMS: linux/amd64
build-acli-container-image:
name: Build Admin CLI Container Image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install script dependencies
run: npm install --prefix ./.ci
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build image
run: ./.ci/acli/buildContainerImage.js
env:
TAG: test
PLATFORMS: linux/amd64
build-fsc-container-image:
name: Build Files Sanity Check Container Image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install script dependencies
run: npm install --prefix ./.ci
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build image
run: ./.ci/fsc/buildContainerImage.js
env:
TAG: test
PLATFORMS: linux/amd64