forked from stellar/anchor-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
133 lines (116 loc) · 5.54 KB
/
Copy pathsub_essential_tests.yml
File metadata and controls
133 lines (116 loc) · 5.54 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
name: Run Essential Tests Workflow
on:
workflow_dispatch:
workflow_call:
jobs:
essential_tests:
name: Run Essential Tests (Integration Tests, Faster End-2-End Tests, Unit Tests, and Stellar Validation Tools)
runs-on: ubuntu-latest-8-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: Pull Stellar Validation Tests Docker Image
run: docker pull stellar/anchor-tests:latest &
- name: Run Kafka, Postgres, and Sep24 UI with docker compose
env:
TEST_PROFILE_NAME: default
run: docker compose -f /home/runner/anchor-platform/service-runner/src/main/resources/docker-compose-test.yaml up -d --build
- name: Run sep server, platform server, observer, and reference servers for integration tests
env:
RUN_DOCKER: false
RUN_ALL_SERVERS: false
RUN_SEP_SERVER: true
RUN_PLATFORM_SERVER: true
RUN_OBSERVER: true
RUN_KOTLIN_REFERENCE_SERVER: true
RUN_EVENT_PROCESSING_SERVER: true
RUN_WALLET_SERVER: true
KT_REFERENCE_SERVER_CONFIG: /home/runner/anchor-platform/service-runner/src/main/resources/config/reference-config.yaml
SEP1_TOML_VALUE: /home/runner/anchor-platform/service-runner/src/main/resources/config/stellar.host.docker.internal.toml
SEP10_WEB_AUTH_DOMAIN: host.docker.internal:8080
SEP10_HOME_DOMAINS: host.docker.internal:8080,*.stellar.org
TOML_PATH: /home/runner/anchor-platform/wallet-reference-server/src/main/resources/toml
run: |
cp /home/runner/anchor-platform/service-runner/build/libs/anchor-platform-runner-*.jar /home/runner/anchor-platform-runner.jar
java -jar /home/runner/anchor-platform-runner.jar -t &
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"
expected-status: "200"
timeout: "300"
interval: "1"
- name: Wait for the wallet server to start and get ready
uses: mydea/action-wait-for-api@v1
with:
url: "http://localhost:8092/.well-known/stellar.toml"
expected-status: "200"
timeout: "300"
interval: "1"
#
# Run Essential Tests
#
- name: Run Essential Tests
env:
RUN_DOCKER: false
ANCHOR_DOMAIN: http://host.docker.internal:8080
run: |
cd /home/runner/anchor-platform
./gradlew runEssentialTests
- name: Run Stellar validation tool
run: |
docker run --network host -v /home/runner/anchor-platform/platform/src/test/resources://config stellar/anchor-tests:v0.6.20 --home-domain http://host.docker.internal:8080 --seps 1 6 10 12 24 31 38 --sep-config //config/stellar-anchor-tests-sep-config.json --verbose
- name: Upload Essential Tests report
if: always()
uses: actions/upload-artifact@v4
with:
name: essential-tests-report
path: |
/home/runner/anchor-platform/api-schema/build/reports/
/home/runner/anchor-platform/core/build/reports/
/home/runner/anchor-platform/platform/build/reports/
/home/runner/anchor-platform/essential-tests/build/reports/