Skip to content
Merged
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
08242d4
added CI for docker workflow
x3c41a Dec 10, 2025
805a5b2
simplified workflow, reused just commands
x3c41a Dec 10, 2025
464dd44
doubled timeout
x3c41a Dec 10, 2025
8db6577
use ubuntu-latest directly for Docker suppor
x3c41a Dec 10, 2025
3ac97ff
added docker check
x3c41a Dec 10, 2025
675b40b
simplify docker verification
x3c41a Dec 10, 2025
3aff147
trigger workflow on ci_cd branch pushes
x3c41a Dec 10, 2025
47cf3d6
add protobuf-compiler dependency
x3c41a Dec 10, 2025
b85e4e6
add libclang dependency
x3c41a Dec 10, 2025
0b777e4
add wasm32 target for runtime compilation
x3c41a Dec 10, 2025
f6a0e53
add rust-src component for wasm compilation
x3c41a Dec 10, 2025
64264d5
use host networking for IPFS Docker on Linux/CI
x3c41a Dec 10, 2025
ca12545
fix Docker networking and add zombienet debugging
x3c41a Dec 11, 2025
a5e204c
fix: use absolute paths for zombienet and bulletin binary
x3c41a Dec 11, 2025
310a547
renamed
x3c41a Dec 11, 2025
c03485f
removed docker verification step - not needed anymore
x3c41a Dec 11, 2025
8bd3e97
Merge branch 'just_docker' into ci_cd
x3c41a Dec 11, 2025
99cbf16
Update .github/workflows/integration-test.yml
x3c41a Dec 11, 2025
eafe553
Update .github/workflows/integration-test.yml
x3c41a Dec 11, 2025
39f13fa
added another test as step
x3c41a Dec 11, 2025
fe9dbdf
updated on push branches
x3c41a Dec 11, 2025
093055d
removed branhces from on pull_request
x3c41a Dec 11, 2025
bf10520
added ci_cd back, modified network_args (added ports)
x3c41a Dec 11, 2025
dd19e8f
removed flag in wget
x3c41a Dec 11, 2025
589bea6
added docker setup
x3c41a Dec 11, 2025
913d51a
added missing dependency
x3c41a Dec 11, 2025
9916426
commented out first test - debugging second
x3c41a Dec 12, 2025
500e522
fixed commit
x3c41a Dec 12, 2025
1a6af76
reverted import, increased node version to 22
x3c41a Dec 12, 2025
5a66383
uncommented first test
x3c41a Dec 12, 2025
2a28be5
reverted branches
x3c41a Dec 12, 2025
395be51
Update .github/workflows/integration-test.yml
x3c41a Dec 12, 2025
36e187c
removed local set-up
x3c41a Dec 12, 2025
6945ee7
Update examples/justfile
bkontur Dec 12, 2025
67a2a29
parametrized run-authorize-and-store
x3c41a Dec 12, 2025
c23ec0e
removed duplicate
x3c41a Dec 12, 2025
d2a6cd4
Update examples/justfile
x3c41a Dec 12, 2025
4fab99c
Removed older TODO
bkontur Dec 12, 2025
4586875
Extract node version
bkontur Dec 12, 2025
aac0a2a
Actually use CI_IMAGE and align with check.yml
bkontur Dec 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 62 additions & 0 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: Integration Tests

on:
push:
branches: [main, ci_cd]
pull_request:
Comment on lines 6 to 8
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not a GH CI/CD export, I was just looking for a way to run the workflow from my branch. Now that it's working, I can simply remove my (ci_cd) branch from here and merge, right? @bkontur

branches: [main]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

env:
CI_IMAGE: "paritytech/ci-unified:bullseye-1.88.0-2025-06-27-v202507112050"

jobs:
smoldot-docker-test:
name: Smoldot Docker Test
runs-on: ubuntu-latest
timeout-minutes: 60

steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
components: rust-src

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y protobuf-compiler libclang-dev

- name: Rust cache
uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
cache-all-crates: true

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache-dependency-path: examples/package.json

- name: Install just
run: cargo install just --locked || true

- name: Download zombienet
run: |
wget -q "https://github.com/paritytech/zombienet/releases/download/v1.3.133/zombienet-linux-x64"
chmod +x zombienet-linux-x64
echo "ZOMBIENET_BINARY=$GITHUB_WORKSPACE/zombienet-linux-x64" >> $GITHUB_ENV

- name: Run smoldot workflow test
working-directory: examples
run: just run-authorize-and-store-smoldot-docker
47 changes: 43 additions & 4 deletions examples/justfile
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,28 @@ bulletin-solo-zombienet-start:
mkdir -p {{ PID_DIR }}

echo "⚡ Starting Bulletin chain with zombienet..."
POLKADOT_BULLETIN_BINARY_PATH=../target/release/polkadot-bulletin-chain ../$(ls ../zombienet-*-*) -p native spawn ../zombienet/bulletin-polkadot-local.toml > /tmp/zombienet.log 2>&1 &

# Find zombienet binary (use env var if set, otherwise search)
if [ -n "$ZOMBIENET_BINARY" ]; then
ZOMBIENET_BIN="$ZOMBIENET_BINARY"
else
ZOMBIENET_BIN=$(ls ../zombienet-*-* 2>/dev/null | head -n 1)
fi

if [ -z "$ZOMBIENET_BIN" ] || [ ! -f "$ZOMBIENET_BIN" ]; then
echo "❌ Error: Zombienet binary not found"
echo " Tried: $ZOMBIENET_BIN"
echo " Set ZOMBIENET_BINARY environment variable or ensure zombienet-* exists in parent directory"
exit 1
fi

echo " Using zombienet: $ZOMBIENET_BIN"

# Get absolute paths for bulletin binary and config
BULLETIN_BINARY=$(cd .. && pwd)/target/release/polkadot-bulletin-chain
ZOMBIENET_CONFIG=$(cd .. && pwd)/zombienet/bulletin-polkadot-local.toml

POLKADOT_BULLETIN_BINARY_PATH=$BULLETIN_BINARY $ZOMBIENET_BIN -p native spawn $ZOMBIENET_CONFIG > /tmp/zombienet.log 2>&1 &
ZOMBIENET_PID=$!
echo $ZOMBIENET_PID > {{ PID_DIR }}/zombienet.pid
echo " Zombienet PID: $ZOMBIENET_PID"
Expand Down Expand Up @@ -261,8 +282,17 @@ ipfs-docker-start: _check-docker
# Pull latest kubo image if not present
docker pull ipfs/kubo:latest

# Determine network mode based on OS
if [[ "$OSTYPE" == "darwin"* ]]; then
# macOS - use port mapping
NETWORK_ARGS="-p 4001:4001 -p 8080:8080 -p 5001:5001"
else
# Linux (including CI) - use host networking for direct access
NETWORK_ARGS="--network host"
fi

# Start Docker container
docker run -d --name ipfs-node -v ipfs-data:/data/ipfs -p 4001:4001 -p 8080:8080 -p 5001:5001 ipfs/kubo:latest
docker run -d --name ipfs-node -v ipfs-data:/data/ipfs $NETWORK_ARGS ipfs/kubo:latest
echo " Container: ipfs-node"
echo " Waiting for container to start..."
sleep 5
Expand All @@ -283,9 +313,9 @@ ipfs-docker-connect:
PROTOCOL="dns4"
DOCKER_HOST="host.docker.internal"
else
# Linux - use ip4/172.17.0.1
# Linux (with host networking) - use ip4/127.0.0.1
PROTOCOL="ip4"
DOCKER_HOST="172.17.0.1"
DOCKER_HOST="127.0.0.1"
fi

echo " Using Docker host: /$PROTOCOL/$DOCKER_HOST"
Expand Down Expand Up @@ -331,6 +361,15 @@ setup-services-docker:
# Start services with Docker
just ipfs-docker-start
just bulletin-solo-zombienet-start

# Wait a bit longer and verify zombienet is running
echo "🔍 Verifying zombienet is ready..."
sleep 10
echo " Zombienet process check:"
ps aux | grep zombienet | grep -v grep || echo " ⚠ No zombienet process found"
echo " Checking zombienet log:"
tail -20 /tmp/zombienet.log || echo " ⚠ Could not read zombienet log"

just ipfs-docker-connect
just ipfs-reconnect-docker-start
just papi-generate
Expand Down
Loading