Skip to content

Commit dec6d15

Browse files
fix ci
1 parent ee5566f commit dec6d15

1 file changed

Lines changed: 40 additions & 18 deletions

File tree

.github/workflows/ci.yml

Lines changed: 40 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,46 @@
11
name: CI
22

33
on:
4-
push:
5-
branches: [main]
6-
pull_request:
7-
branches: [main]
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
env:
10+
BIN: ${{ github.workspace }}/bin
11+
SCRIPTS: ${{ github.workspace }}/scripts
12+
ZOMBIE_DIR: /tmp/zombie-test
813

914
jobs:
10-
lint:
11-
runs-on: ubuntu-latest
12-
steps:
13-
- uses: actions/checkout@v4
14-
- uses: oven-sh/setup-bun@v2
15-
- run: bun install
16-
- run: bun run build
15+
test:
16+
runs-on: ubuntu-latest
17+
needs: setup
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: oven-sh/setup-bun@v2
21+
- name: Setup
22+
run: make setup
23+
- name: Start network
24+
run: |
25+
BIN=$(realpath ppn/bin) SCRIPTS=$(realpath ppn/scripts) \
26+
ppn/bin/zombie-cli spawn -p native -d ${{ env.ZOMBIE_DIR }} \
27+
ppn/zombienet-configs/local-dev.toml & \
28+
echo "Waiting for network to start..."
29+
30+
# Wait for network to be ready (check for zombie.json)
31+
echo "Waiting for network to start..."
32+
for i in {1..60}; do
33+
if [ -f "${{ env.ZOMBIE_DIR }}/zombie.json" ]; then
34+
echo "Network started, zombie.json found"
35+
break
36+
fi
37+
sleep 10
38+
done
1739
18-
test:
19-
runs-on: ubuntu-latest
20-
steps:
21-
- uses: actions/checkout@v4
22-
- uses: oven-sh/setup-bun@v2
23-
- run: bun install
24-
- run: bun test
40+
# Additional wait for nodes to be ready
41+
sleep 30
42+
- name: Run tests
43+
run: |
44+
bun install
45+
bun test
46+
bun test tests/e2e.test.ts

0 commit comments

Comments
 (0)