-
Notifications
You must be signed in to change notification settings - Fork 6
211 lines (176 loc) · 7.25 KB
/
pr-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
name: Pull Request tests
on: [pull_request]
jobs:
unit-tests:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "18" # Specify a Node.js version
- name: Install dependencies
run: npm install
- name: Build and Smoke Test
run: npm run test:smoketest
- name: Run Unit Tests
run: |
npm run test
unit-tests-windows:
runs-on: windows-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "18" # Specify a Node.js version
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Run Unit Tests
run: |
npm run test
local_integration:
runs-on: ubuntu-latest
environment:
name: selfhosted
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "18" # Specify a Node.js version
- name: Install dependencies
run: npm install
# Workaround for https://github.com/actions/runner-images/issues/2821
- name: Remove mono blocking 8084 port
run: sudo kill -9 $(sudo lsof -t -i:8084)
- name: Set up Docker
run: |
echo ${{ secrets.DOCKER_PASSWORD }} | docker login --username joshua.wulf --password-stdin registry.camunda.cloud
- name: Set up Docker Compose
run: |
docker-compose -f docker/docker-compose.yml -f docker/docker-compose-modeler.yaml up -d
- name: Run Integration Tests
run: |
npm run test:local-integration
env:
CAMUNDA_SECURE_CONNECTION: false
ZEEBE_ADDRESS: localhost:26500
ZEEBE_CLIENT_ID: zeebe
ZEEBE_CLIENT_SECRET: zecret
CAMUNDA_OAUTH_URL: http://localhost:18080/auth/realms/camunda-platform/protocol/openid-connect/token
CAMUNDA_TASKLIST_BASE_URL: http://localhost:8082
CAMUNDA_OPERATE_BASE_URL: http://localhost:8081
CAMUNDA_OPTIMIZE_BASE_URL: http://localhost:8083
CAMUNDA_MODELER_BASE_URL: http://localhost:8070/api
- name: Cleanup
if: always()
run: docker-compose -f docker/docker-compose.yml -f docker/docker-compose-modeler.yaml down
local_multitenancy_integration:
runs-on: ubuntu-latest
environment:
name: selfhosted
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "18" # Specify a Node.js version
- name: Install dependencies
run: npm install
# Workaround for https://github.com/actions/runner-images/issues/2821
- name: Remove mono blocking 8084 port
run: sudo kill -9 $(sudo lsof -t -i:8084)
- name: Set up Docker
run: |
echo ${{ secrets.DOCKER_PASSWORD }} | docker login --username joshua.wulf --password-stdin registry.camunda.cloud
- name: Set up Docker Compose
run: |
docker-compose -f docker/docker-compose-multitenancy.yml -f docker/docker-compose-modeler.yaml up -d
- name: Run Integration Tests
run: |
npm run test:multitenancy
env:
CAMUNDA_SECURE_CONNECTION: false
ZEEBE_ADDRESS: localhost:26500
ZEEBE_CLIENT_ID: zeebe
ZEEBE_CLIENT_SECRET: zecret
CAMUNDA_OAUTH_URL: http://localhost:18080/auth/realms/camunda-platform/protocol/openid-connect/token
CAMUNDA_TASKLIST_BASE_URL: http://localhost:8082
CAMUNDA_OPERATE_BASE_URL: http://localhost:8081
CAMUNDA_OPTIMIZE_BASE_URL: http://localhost:8083
CAMUNDA_MODELER_BASE_URL: http://localhost:8070/api
# Needed for Multi-Tenancy
CAMUNDA_TENANT_ID: <default>
- name: Cleanup
if: always()
run: docker-compose -f docker/docker-compose-multitenancy.yml -f docker/docker-compose-modeler.yaml down
saas_integration:
runs-on: ubuntu-latest
environment: integration
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "18" # Specify a Node.js version
- name: Install dependencies
run: npm install
- name: Run Integration Tests
run: |
npm run test:integration
env:
ZEEBE_ADDRESS: ${{ secrets.ZEEBE_ADDRESS }}
ZEEBE_CLIENT_ID: ${{ secrets.ZEEBE_CLIENT_ID }}
ZEEBE_AUTHORIZATION_SERVER_URL: ${{ secrets.ZEEBE_AUTHORIZATION_SERVER_URL }}
ZEEBE_CLIENT_SECRET: ${{ secrets.ZEEBE_CLIENT_SECRET }}
ZEEBE_TOKEN_AUDIENCE: ${{ secrets.ZEEBE_TOKEN_AUDIENCE }}
CAMUNDA_CREDENTIALS_SCOPES: ${{ secrets.CAMUNDA_CREDENTIALS_SCOPES }}
CAMUNDA_OAUTH_URL: ${{ secrets.CAMUNDA_OAUTH_URL }}
CAMUNDA_TASKLIST_BASE_URL: ${{ secrets.CAMUNDA_TASKLIST_BASE_URL }}
CAMUNDA_OPERATE_BASE_URL: ${{ secrets.CAMUNDA_OPERATE_BASE_URL }}
CAMUNDA_OPTIMIZE_BASE_URL: ${{ secrets.CAMUNDA_OPTIMIZE_BASE_URL }}
CAMUNDA_MODELER_BASE_URL: https://modeler.cloud.camunda.io/api
CAMUNDA_CONSOLE_CLIENT_ID: ${{ secrets.CAMUNDA_CONSOLE_CLIENT_ID }}
CAMUNDA_CONSOLE_CLIENT_SECRET: ${{ secrets.CAMUNDA_CONSOLE_CLIENT_SECRET }}
CAMUNDA_CONSOLE_BASE_URL: ${{ secrets.CAMUNDA_CONSOLE_BASE_URL }}
CAMUNDA_CONSOLE_OAUTH_AUDIENCE: ${{ secrets.CAMUNDA_CONSOLE_OAUTH_AUDIENCE}}
saas_integration_windows:
needs: saas_integration
runs-on: windows-latest
environment: integration
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "18" # Specify a Node.js version
- name: Install dependencies
run: npm install
- name: Run Integration Tests
run: |
npm run test:integration
env:
ZEEBE_ADDRESS: ${{ secrets.ZEEBE_ADDRESS }}
ZEEBE_CLIENT_ID: ${{ secrets.ZEEBE_CLIENT_ID }}
ZEEBE_AUTHORIZATION_SERVER_URL: ${{ secrets.ZEEBE_AUTHORIZATION_SERVER_URL }}
ZEEBE_CLIENT_SECRET: ${{ secrets.ZEEBE_CLIENT_SECRET }}
ZEEBE_TOKEN_AUDIENCE: ${{ secrets.ZEEBE_TOKEN_AUDIENCE }}
CAMUNDA_CREDENTIALS_SCOPES: ${{ secrets.CAMUNDA_CREDENTIALS_SCOPES }}
CAMUNDA_OAUTH_URL: ${{ secrets.CAMUNDA_OAUTH_URL }}
CAMUNDA_TASKLIST_BASE_URL: ${{ secrets.CAMUNDA_TASKLIST_BASE_URL }}
CAMUNDA_OPERATE_BASE_URL: ${{ secrets.CAMUNDA_OPERATE_BASE_URL }}
CAMUNDA_OPTIMIZE_BASE_URL: ${{ secrets.CAMUNDA_OPTIMIZE_BASE_URL }}
CAMUNDA_MODELER_BASE_URL: https://modeler.cloud.camunda.io/api
CAMUNDA_CONSOLE_CLIENT_ID: ${{ secrets.CAMUNDA_CONSOLE_CLIENT_ID }}
CAMUNDA_CONSOLE_CLIENT_SECRET: ${{ secrets.CAMUNDA_CONSOLE_CLIENT_SECRET }}
CAMUNDA_CONSOLE_BASE_URL: ${{ secrets.CAMUNDA_CONSOLE_BASE_URL }}
CAMUNDA_CONSOLE_OAUTH_AUDIENCE: ${{ secrets.CAMUNDA_CONSOLE_OAUTH_AUDIENCE}}