Skip to content

Commit 088e416

Browse files
dkijaniaclaude
andcommitted
Add integration test CI with mina-lightnet-docker
Runs integration tests against a real Mina daemon in CI: - Uses o1labs/mina-local-network:compatible-latest-lightnet (single-node, no proofs) - Waits for network sync via o1-labs/wait-for-mina-network-action - Acquires funded test accounts from Mina Accounts Manager (port 8181) - Runs full test suite: daemon queries, account queries, payments Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 9f33393 commit 088e416

1 file changed

Lines changed: 66 additions & 0 deletions

File tree

.github/workflows/integration.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: Integration Tests
2+
3+
on:
4+
push:
5+
branches: [master, main]
6+
pull_request:
7+
branches: [master, main]
8+
workflow_dispatch:
9+
10+
jobs:
11+
integration:
12+
runs-on: ubuntu-latest
13+
timeout-minutes: 15
14+
15+
services:
16+
mina:
17+
image: o1labs/mina-local-network:compatible-latest-lightnet
18+
env:
19+
NETWORK_TYPE: single-node
20+
PROOF_LEVEL: none
21+
LOG_LEVEL: Info
22+
RUN_ARCHIVE_NODE: false
23+
SLOT_TIME: 20000
24+
ports:
25+
- 8080:8080
26+
- 8181:8181
27+
- 3085:3085
28+
29+
steps:
30+
- uses: actions/checkout@v4
31+
32+
- name: Set up Python
33+
uses: actions/setup-python@v5
34+
with:
35+
python-version: "3.12"
36+
37+
- name: Install SDK
38+
run: |
39+
python -m pip install --upgrade pip
40+
pip install -e ".[dev]"
41+
42+
- name: Wait for Mina network
43+
uses: o1-labs/wait-for-mina-network-action@v1
44+
with:
45+
mina-graphql-port: "8080"
46+
max-attempts: "60"
47+
polling-interval-ms: "10000"
48+
49+
- name: Acquire test accounts
50+
id: accounts
51+
run: |
52+
SENDER=$(curl -s http://127.0.0.1:8181/acquire-account?unlockAccount=true)
53+
RECEIVER=$(curl -s http://127.0.0.1:8181/acquire-account)
54+
SENDER_PK=$(echo "$SENDER" | python -c "import sys,json; print(json.load(sys.stdin)['pk'])")
55+
RECEIVER_PK=$(echo "$RECEIVER" | python -c "import sys,json; print(json.load(sys.stdin)['pk'])")
56+
echo "sender_pk=$SENDER_PK" >> "$GITHUB_OUTPUT"
57+
echo "receiver_pk=$RECEIVER_PK" >> "$GITHUB_OUTPUT"
58+
echo "Sender: $SENDER_PK"
59+
echo "Receiver: $RECEIVER_PK"
60+
61+
- name: Run integration tests
62+
env:
63+
MINA_GRAPHQL_URI: http://127.0.0.1:8080/graphql
64+
MINA_TEST_SENDER_KEY: ${{ steps.accounts.outputs.sender_pk }}
65+
MINA_TEST_RECEIVER_KEY: ${{ steps.accounts.outputs.receiver_pk }}
66+
run: pytest tests/test_integration.py -v --tb=long

0 commit comments

Comments
 (0)