Skip to content

Interop Nightly (Helia) #112

Interop Nightly (Helia)

Interop Nightly (Helia) #112

name: Interop Nightly (Helia)
on:
schedule:
- cron: '0 4 * * *'
workflow_dispatch:
env:
KUBO_VERSION: ${{ vars.KUBO_VERSION || 'v0.42.0' }}
jobs:
interop-helia:
name: Helia Bitswap/CAR/PubSub Interop
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Set up Dart
uses: dart-lang/setup-dart@6afc89df92d6eb3834022f73cd65adc8cdfcb92d # v1
with:
sdk: stable
- name: Read pinned Kubo version
id: kubo_version
run: |
if [ -f test/interop/.kubo-version ]; then
echo "KUBO_VERSION=$(cat test/interop/.kubo-version)" >> "$GITHUB_OUTPUT"
else
echo "KUBO_VERSION=${{ env.KUBO_VERSION }}" >> "$GITHUB_OUTPUT"
fi
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f87e5991a6d7451dcb8d9637bfbc97413f497069 # v4
- name: Generate private-network swarm key
run: test/interop/generate_swarm_key.sh
- name: Start interop network (with Helia)
env:
KUBO_VERSION: ${{ steps.kubo_version.outputs.KUBO_VERSION }}
run: |
docker compose -f test/interop/docker-compose.yml --profile helia build \
--build-arg KUBO_VERSION="$KUBO_VERSION" dart_ipfs helia
docker compose -f test/interop/docker-compose.yml --profile helia up -d dart_ipfs kubo helia
- name: Populate pub cache on host
run: |
mkdir -p /tmp/interop-pub-cache
PUB_CACHE=/tmp/interop-pub-cache dart pub get
- name: Install Dart dependencies (offline)
run: |
docker compose -f test/interop/docker-compose.yml --profile helia run --rm test-runner \
dart pub get --offline
- name: Wait for peers and bootstrap connectivity
timeout-minutes: 8
env:
KUBO_VERSION: ${{ steps.kubo_version.outputs.KUBO_VERSION }}
run: |
docker compose -f test/interop/docker-compose.yml --profile helia run --rm test-runner \
dart run --enable-experiment=native-assets test/interop/bin/setup.dart
- name: Run Helia interop tests
id: helia_tests
env:
KUBO_VERSION: ${{ steps.kubo_version.outputs.KUBO_VERSION }}
run: |
docker compose -f test/interop/docker-compose.yml --profile helia run --rm test-runner \
dart test --enable-experiment=native-assets --preset interop --reporter expanded \
test/interop/test/helia_test.dart test/interop/test/pubsub_test.dart \
test/interop/test/pubsub_kubo_test.dart test/interop/test/connectivity_test.dart
- name: Collect container logs
if: always()
run: |
mkdir -p /tmp/interop-logs
docker compose -f test/interop/docker-compose.yml --profile helia logs --no-color > /tmp/interop-logs/containers.log 2>&1 || true
- name: Upload Helia logs
if: always()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: interop-helia-logs
path: /tmp/interop-logs/
retention-days: 7
- name: Report Helia status
if: always()
run: |
echo "Helia interop status: ${{ steps.helia_tests.outcome }}"
- name: Tear down interop network
if: always()
run: |
docker compose -f test/interop/docker-compose.yml --profile helia down --volumes --remove-orphans