-
Notifications
You must be signed in to change notification settings - Fork 25
69 lines (59 loc) · 1.84 KB
/
Copy pathintegration_test.yml
File metadata and controls
69 lines (59 loc) · 1.84 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
on:
push:
branches:
- main
- dev
pull_request:
branches:
- main
- dev
name: Integration Test
env:
RIPPLED_DOCKER_IMAGE: rippleci/rippled:develop
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: |
until docker inspect --format='{{.State.Health.Status}}' rippled-service | grep -q healthy; do
echo "Waiting for rippled to be ready..."
sleep 2
done
- 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