-
Notifications
You must be signed in to change notification settings - Fork 25
82 lines (72 loc) · 2.43 KB
/
Copy pathintegration_test.yml
File metadata and controls
82 lines (72 loc) · 2.43 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
on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev
name: Integration Test
env:
# Pin to known-good digest; rippleci/rippled:develop broke after 2026-04-01
RIPPLED_DOCKER_IMAGE: rippleci/rippled:develop@sha256:328175bf14b7b83db9e5e6b50c7458bf828b02b2855453efc038233094aa8d85
jobs:
integration_test:
name: Integration Test
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Start rippled standalone
run: |
docker run --detach --rm \
-p 5005:5005 \
-p 6006:6006 \
--volume "${{ github.workspace }}/.ci-config/":"/etc/opt/ripple/" \
--name rippled-service \
--health-cmd="rippled server_info || exit 1" \
--health-interval=5s \
--health-retries=10 \
--health-timeout=2s \
--env GITHUB_ACTIONS=true \
--env CI=true \
--entrypoint bash \
${{ env.RIPPLED_DOCKER_IMAGE }} \
-c "mkdir -p /var/lib/rippled/db/ && rippled -a"
- name: Wait for rippled to be healthy
run: |
for i in $(seq 1 30); do
if ! docker ps -q -f name=rippled-service | grep -q .; then
echo "Container exited unexpectedly"
docker logs rippled-service 2>&1 || true
exit 1
fi
STATUS=$(docker inspect --format='{{.State.Health.Status}}' rippled-service 2>/dev/null || echo "unknown")
echo "Attempt $i/30: $STATUS"
if [ "$STATUS" = "healthy" ]; then
exit 0
fi
sleep 2
done
echo "Timed out waiting for rippled"
docker logs rippled-service 2>&1 || true
exit 1
- uses: dtolnay/rust-toolchain@stable
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-integration-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-integration-
- name: Run integration tests
run: cargo test --release --features std,json-rpc,helpers,integration --test integration_test -- --test-threads=1
env:
RUST_BACKTRACE: 1
- name: Stop rippled
if: always()
run: docker stop rippled-service