Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
6 changes: 1 addition & 5 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
run: echo "CI_IMAGE=${{ env.CI_IMAGE }}" >> $GITHUB_OUTPUT

check-fmt:
runs-on: ubuntu-latest
runs-on: parity-default
timeout-minutes: 20
needs: [set-image]
container:
Expand All @@ -57,7 +57,6 @@ jobs:

check:
name: Cargo check
# TODO: replace `parity-default` with `ubuntu-latest` when the repo becomes public.
runs-on: parity-default
needs: [set-image, check-fmt]
container:
Expand All @@ -77,7 +76,6 @@ jobs:

check-benchmarking:
name: Cargo check (benchmarking)
# TODO: replace `parity-default` with `ubuntu-latest` when the repo becomes public.
runs-on: parity-default
needs: [set-image, check]
container:
Expand All @@ -98,7 +96,6 @@ jobs:

clippy:
name: Cargo clippy
# TODO: replace `parity-default` with `ubuntu-latest` when the repo becomes public.
runs-on: parity-default
needs: [set-image, check]
container:
Expand All @@ -123,7 +120,6 @@ jobs:

test:
name: Test
# TODO: replace `parity-default` with `ubuntu-latest` when the repo becomes public.
runs-on: parity-default
timeout-minutes: 60
needs: [set-image, check]
Expand Down
80 changes: 80 additions & 0 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Integration Tests

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [main]
pull_request:
branches: [main]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

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

# Parity CI image to use
# Common variable is defined in the workflow
# Repo env variable doesn't work for PRs from forks
env:
CI_IMAGE: "paritytech/ci-unified:bullseye-1.88.0-2025-06-27-v202507112050"
NODE_VERSION: 22

jobs:
set-image:
# This workaround sets the container image for each job using 'set-image' job output.
# env variables don't work for PRs from forks, so we need to use outputs.
runs-on: ubuntu-latest
outputs:
CI_IMAGE: ${{ steps.set_image.outputs.CI_IMAGE }}
steps:
- id: set_image
run: echo "CI_IMAGE=${{ env.CI_IMAGE }}" >> $GITHUB_OUTPUT

integration-tests:
name: Integration Tests
runs-on: parity-default
timeout-minutes: 60
needs: [ set-image ]
container:
image: ${{ needs.set-image.outputs.CI_IMAGE }}

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

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

- name: Setup Node.js
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- name: Setup Node.js
- name: Install Docker
run: |
curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER
- name: Setup Node.js

uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
cache-dependency-path: examples/package.json

- name: Install just
run: cargo install just --locked || true
Copy link
Collaborator

Choose a reason for hiding this comment

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

cargo install just took 1 minute: https://github.com/paritytech/polkadot-bulletin-chain/actions/runs/20167172002/job/57893348325?pr=138#step:6:212

let's try this (when actual CI passes):

Suggested change
run: cargo install just --locked || true
run: sudo apt-get update && sudo apt-get install -y just

Copy link
Contributor Author

Choose a reason for hiding this comment

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

mhm, the CI failed, docker is not installed.

Copy link
Collaborator

Choose a reason for hiding this comment

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

mhm, the CI failed, docker is not installed.

ehm, I enabled auto-merge and forgot to mark as required,
let's continue here: #145


- name: Download zombienet
run: |
curl -L \
-H "Authorization: token ${{ github.token }}" \
-o zombienet-linux-x64 \
"https://github.com/paritytech/zombienet/releases/download/v1.3.138/zombienet-linux-x64"
chmod +x zombienet-linux-x64
echo "ZOMBIENET_BINARY=$GITHUB_WORKSPACE/zombienet-linux-x64" >> $GITHUB_ENV

- name: Run authorize and store (PAPI, smoldot)
working-directory: examples
run: just run-authorize-and-store "smoldot"

- name: Run authorize and store (PAPI, RPC node)
working-directory: examples
run: just run-authorize-and-store "ws"
8 changes: 6 additions & 2 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ tar -xvzf kubo_v0.38.1_darwin-arm64.tar.gz

#### Use Docker

* Use `172.17.0.1` or `host.docker.internal` for swarm connections
* Use `host.docker.internal` (macOS/Windows) or `172.17.0.1` (Linux) for swarm connections

```shell
docker pull ipfs/kubo:latest
Expand Down Expand Up @@ -107,7 +107,11 @@ POLKADOT_BULLETIN_BINARY_PATH=./target/release/polkadot-bulletin-chain \
```

```shell
# Uses Docker (replace 127.0.0.1 with 172.17.0.1)
# Uses Docker on macOS/Windows (use dns4/host.docker.internal)
docker exec -it ipfs-node ipfs swarm connect /dns4/host.docker.internal/tcp/10001/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm
docker exec -it ipfs-node ipfs swarm connect /dns4/host.docker.internal/tcp/12347/ws/p2p/12D3KooWRkZhiRhsqmrQ28rt73K7V3aCBpqKrLGSXmZ99PTcTZby

# Uses Docker on Linux (use ip4/172.17.0.1)
docker exec -it ipfs-node ipfs swarm connect /ip4/172.17.0.1/tcp/10001/ws/p2p/12D3KooWQCkBm1BYtkHpocxCwMgR8yjitEeHGx8spzcDLGt2gkBm
docker exec -it ipfs-node ipfs swarm connect /ip4/172.17.0.1/tcp/12347/ws/p2p/12D3KooWRkZhiRhsqmrQ28rt73K7V3aCBpqKrLGSXmZ99PTcTZby
```
Expand Down
Loading
Loading