forked from stellar/anchor-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
219 lines (191 loc) · 8.4 KB
/
Copy pathsub_extended_tests.yml
File metadata and controls
219 lines (191 loc) · 8.4 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
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
name: Run Extended Tests Workflow
on:
workflow_dispatch:
workflow_call:
jobs:
extended_tests:
name: Run Extended Tests
runs-on: ubuntu-latest-16-cores
env:
# Anchor Platform secrets
SECRET_SEP10_SIGNING_SEED: ${{ vars.SECRET_SEP10_SIGNING_SEED }}
APP__PAYMENT_SIGNING_SEED: ${{ vars.APP__PAYMENT_SIGNING_SEED }}
SECRET__KEY: ${{ vars.SECRET__KEY }}
# Test secrets
TEST_CLIENT_WALLET_SECRET: ${{ vars.TEST_CLIENT_WALLET_SECRET }}
TEST_CLIENT_WALLET_EXTRA_SIGNER_1_SECRET: ${{ vars.TEST_CLIENT_WALLET_EXTRA_SIGNER_1_SECRET }}
TEST_CLIENT_WALLET_EXTRA_SIGNER_2_SECRET: ${{ vars.TEST_CLIENT_WALLET_EXTRA_SIGNER_2_SECRET }}
TEST_WITHDRAW_FUND_CLIENT_SECRET_1: ${{ vars.TEST_WITHDRAW_FUND_CLIENT_SECRET_1 }}
TEST_WITHDRAW_FUND_CLIENT_SECRET_2: ${{ vars.TEST_WITHDRAW_FUND_CLIENT_SECRET_2 }}
TEST_DEPOSIT_FUND_CLIENT_SECRET_1: ${{ vars.TEST_DEPOSIT_FUND_CLIENT_SECRET_1 }}
TEST_DEPOSIT_FUND_CLIENT_SECRET_2: ${{ vars.TEST_DEPOSIT_FUND_CLIENT_SECRET_2 }}
steps:
#############################################
# Setup JDK 17
# Download, and Extract anchor-platform.tar
# Setup hostnames (/etc/hosts)
#############################################
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'adopt'
- name: Download anchor-platform.tar
uses: actions/download-artifact@v4
with:
name: anchor-platform-tar
path: /home/runner/
- name: Extract anchor-platform.tar
run: |
cd /home/runner
tar -xf /home/runner/anchor-platform.tar
cd /home/runner/anchor-platform
- name: Set up hostnames (/etc/hosts)
run: |
sudo echo "127.0.0.1 db" | sudo tee -a /etc/hosts
sudo echo "127.0.0.1 kafka" | sudo tee -a /etc/hosts
sudo echo "127.0.0.1 sep24-reference-ui" | sudo tee -a /etc/hosts
sudo echo "127.0.0.1 reference-server" | sudo tee -a /etc/hosts
sudo echo "127.0.0.1 reference-db" | sudo tee -a /etc/hosts
sudo echo "127.0.0.1 wallet-server" | sudo tee -a /etc/hosts
sudo echo "127.0.0.1 platform" | sudo tee -a /etc/hosts
sudo echo "127.0.0.1 custody-server" | sudo tee -a /etc/hosts
sudo echo "127.0.0.1 host.docker.internal" | sudo tee -a /etc/hosts
#############################################
- name: Run Kafka, Postgres, and Sep24 UI with docker compose
run: docker compose -f /home/runner/anchor-platform/service-runner/src/main/resources/docker-compose-test.yaml up -d --build
# `custody` Tests
- name: Start `custody` configuration
env:
TEST_PROFILE_NAME: custody
KT_REFERENCE_SERVER_CONFIG: /home/runner/anchor-platform/service-runner/src/main/resources/config/reference-config.yaml
run: |
cd /home/runner/anchor-platform
./gradlew startServersWithTestProfile &
echo "PID=$!" >> $GITHUB_ENV
- name: Wait for the sep server to start and get ready
uses: mydea/action-wait-for-api@v1
with:
url: "http://localhost:8080/.well-known/stellar.toml"
interval: "1"
- name: Run `custody` configuration tests
env:
TEST_PROFILE_NAME: custody
run: |
cd /home/runner/anchor-platform
./gradlew :service-runner:clean :extended-tests:clean :extended-tests:test --tests org.stellar.anchor.platform.suite.CustodyTestSuite
kill -9 $PID
# `rpc` Tests
- name: Start `rpc` configuration
env:
TEST_PROFILE_NAME: rpc
KT_REFERENCE_SERVER_CONFIG: /home/runner/anchor-platform/service-runner/src/main/resources/config/reference-config.yaml
run: |
cd /home/runner/anchor-platform
./gradlew startServersWithTestProfile &
echo "PID=$!" >> $GITHUB_ENV
- name: Wait for the sep server to start and get ready
uses: mydea/action-wait-for-api@v1
with:
url: "http://localhost:8080/.well-known/stellar.toml"
interval: "1"
- name: Run `rpc` configuration tests
env:
TEST_PROFILE_NAME: rpc
run: |
cd /home/runner/anchor-platform
./gradlew :extended-tests:test --tests org.stellar.anchor.platform.suite.RpcTestSuite
kill -9 $PID
# `auth-apikey-custody` Tests
- name: Start `auth-apikey-custody` configuration
env:
TEST_PROFILE_NAME: auth-apikey-custody
KT_REFERENCE_SERVER_CONFIG: /home/runner/anchor-platform/service-runner/src/main/resources/config/reference-config.yaml
run: |
cd /home/runner/anchor-platform
./gradlew startServersWithTestProfile &
echo "PID=$!" >> $GITHUB_ENV
- name: Wait for the custody server to start and get ready
uses: mydea/action-wait-for-api@v1
with:
url: "http://localhost:8086/health"
interval: "1"
- name: Run `auth-apikey-custody` configuration tests
env:
TEST_PROFILE_NAME: auth-apikey-custody
run: |
cd /home/runner/anchor-platform
./gradlew :extended-tests:test --tests org.stellar.anchor.platform.suite.AuthApikeyCustodyTestSuite
kill -9 $PID
# `auth-jwt-custody` Tests
- name: Start `auth-jwt-custody` configuration
env:
TEST_PROFILE_NAME: auth-jwt-custody
KT_REFERENCE_SERVER_CONFIG: /home/runner/anchor-platform/service-runner/src/main/resources/config/reference-config.yaml
run: |
cd /home/runner/anchor-platform
./gradlew startServersWithTestProfile &
echo "PID=$!" >> $GITHUB_ENV
- name: Wait for the custody server to start and get ready
uses: mydea/action-wait-for-api@v1
with:
url: "http://localhost:8086/health"
interval: "1"
- name: Run `auth-jwt-custody` configuration tests
env:
TEST_PROFILE_NAME: auth-jwt-custody
run: |
cd /home/runner/anchor-platform
./gradlew :extended-tests:test --tests org.stellar.anchor.platform.suite.AuthJwtCustodyTestSuite
kill -9 $PID
# `auth-apikey-platform` Tests
- name: Start `auth-apikey-platform` configuration
env:
TEST_PROFILE_NAME: auth-apikey-platform
KT_REFERENCE_SERVER_CONFIG: /home/runner/anchor-platform/service-runner/src/main/resources/config/reference-config.yaml
run: |
cd /home/runner/anchor-platform
./gradlew startServersWithTestProfile &
echo "PID=$!" >> $GITHUB_ENV
- name: Wait for the platform server to start and get ready
uses: mydea/action-wait-for-api@v1
with:
url: "http://localhost:8085/health"
expected-status: "403"
interval: "1"
- name: Run `auth-apikey-platform` configuration tests
env:
TEST_PROFILE_NAME: auth-apikey-platform
run: |
cd /home/runner/anchor-platform
./gradlew :extended-tests:test --tests org.stellar.anchor.platform.suite.AuthApikeyPlatformTestSuite
kill -9 $PID
# `auth-jwt-platform` Tests
- name: Start `auth-jwt-platform` configuration
env:
TEST_PROFILE_NAME: auth-jwt-platform
KT_REFERENCE_SERVER_CONFIG: /home/runner/anchor-platform/service-runner/src/main/resources/config/reference-config.yaml
run: |
cd /home/runner/anchor-platform
./gradlew startServersWithTestProfile &
echo "PID=$!" >> $GITHUB_ENV
- name: Wait for the platform server to start and get ready
uses: mydea/action-wait-for-api@v1
with:
url: "http://localhost:8085/health"
expected-status: "403"
interval: "1"
- name: Run `auth-jwt-platform` configuration tests
env:
TEST_PROFILE_NAME: auth-jwt-platform
run: |
cd /home/runner/anchor-platform
./gradlew :extended-tests:test --tests org.stellar.anchor.platform.suite.AuthJwtPlatformTestSuite
kill -9 $PID
- name: Upload Extended Tests Report
if: always()
uses: actions/upload-artifact@v4
with:
name: extended-tests-report
path: |
/home/runner/anchor-platform/extended-tests/build/reports/