More nits #521
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 | |
| env: | |
| NODE_VERSION: 22 | |
| POLKADOT_SDK_VERSION: polkadot-stable2512 | |
| POLKADOT_SDK_VERSION_WITH_BULLETIN: unstable-bulletin-support-v1 | |
| POLKADOT_SDK_BIN_DIR: ${{ github.workspace }}/.polkadot-sdk-bin | |
| ZOMBIENET_VERSION: v1.3.138 | |
| ZOMBIENET_BIN_DIR: ${{ github.workspace }}/.zombienet-bin | |
| jobs: | |
| setup: | |
| name: Setup | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Free Disk Space (Ubuntu) | |
| if: ${{ runner.environment == 'github-hosted' }} | |
| uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1 | |
| with: | |
| tool-cache: false | |
| # Cache the Polkadot SDK binaries | |
| - name: Cache Polkadot SDK binaries | |
| uses: actions/cache@v3 | |
| id: polkadot-sdk-cache | |
| with: | |
| path: ${{ env.POLKADOT_SDK_BIN_DIR }} | |
| key: polkadot-sdk-${{ env.POLKADOT_SDK_VERSION }}-${{ env.POLKADOT_SDK_VERSION_WITH_BULLETIN }}-binaries | |
| # Download and extract binaries if cache missed | |
| - name: Download Polkadot SDK binaries | |
| if: steps.polkadot-sdk-cache.outputs.cache-hit != 'true' | |
| run: | | |
| mkdir -p $POLKADOT_SDK_BIN_DIR | |
| cd $POLKADOT_SDK_BIN_DIR | |
| echo "Downloading Polkadot SDK binaries..." | |
| curl -L -o polkadot https://github.com/paritytech/polkadot-sdk/releases/download/${POLKADOT_SDK_VERSION}/polkadot | |
| curl -L -o polkadot-prepare-worker https://github.com/paritytech/polkadot-sdk/releases/download/${POLKADOT_SDK_VERSION}/polkadot-prepare-worker | |
| curl -L -o polkadot-execute-worker https://github.com/paritytech/polkadot-sdk/releases/download/${POLKADOT_SDK_VERSION}/polkadot-execute-worker | |
| curl -L -o chain-spec-builder https://github.com/paritytech/polkadot-sdk/releases/download/${POLKADOT_SDK_VERSION}/chain-spec-builder | |
| # TODO: replace POLKADOT_SDK_VERSION_WITH_BULLETIN with POLKADOT_SDK_VERSION when released: https://github.com/paritytech/polkadot-sdk/pull/10662 | |
| curl -L -o polkadot-omni-node https://github.com/paritytech/polkadot-sdk/releases/download/${POLKADOT_SDK_VERSION_WITH_BULLETIN}/polkadot-omni-node | |
| chmod +x * | |
| # Cache the Zombienet binaries | |
| - name: Cache Zombienet | |
| uses: actions/cache@v3 | |
| id: zombienet-cache | |
| with: | |
| path: ${{ env.ZOMBIENET_BIN_DIR }} | |
| key: zombienet-${{ env.ZOMBIENET_VERSION }}-binaries | |
| # Download and extract binaries if cache missed | |
| - name: Download Zombienet binaries | |
| if: steps.zombienet-cache.outputs.cache-hit != 'true' | |
| run: | | |
| mkdir -p $ZOMBIENET_BIN_DIR | |
| cd $ZOMBIENET_BIN_DIR | |
| curl -L \ | |
| -H "Authorization: token ${{ github.token }}" \ | |
| -o zombienet-linux-x64 \ | |
| "https://github.com/paritytech/zombienet/releases/download/${ZOMBIENET_VERSION}/zombienet-linux-x64" | |
| chmod +x zombienet-linux-x64 | |
| integration-tests: | |
| needs: [setup] | |
| name: Integration Tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 200 | |
| 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 rm -f /etc/apt/sources.list.d/microsoft-prod.list /etc/apt/sources.list.d/azure-cli.list | |
| sudo apt-get update | |
| sudo apt-get install -y protobuf-compiler libclang-dev | |
| - name: Rust cache (Bulletin) | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: . | |
| shared-key: "bulletin-cache-bulletin-integration-tests" | |
| save-if: ${{ github.ref == 'refs/heads/main' }} | |
| - 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 | |
| - name: Cache Polkadot SDK binaries | |
| uses: actions/cache@v3 | |
| id: polkadot-sdk-cache | |
| with: | |
| path: ${{ env.POLKADOT_SDK_BIN_DIR }} | |
| key: polkadot-sdk-${{ env.POLKADOT_SDK_VERSION }}-${{ env.POLKADOT_SDK_VERSION_WITH_BULLETIN }}-binaries | |
| - name: Cache Zombienet | |
| uses: actions/cache@v3 | |
| id: zombienet-cache | |
| with: | |
| path: ${{ env.ZOMBIENET_BIN_DIR }} | |
| key: zombienet-${{ env.ZOMBIENET_VERSION }}-binaries | |
| - name: Add binaries to PATH | |
| run: | | |
| chmod +x "${POLKADOT_SDK_BIN_DIR}"/* | |
| ls -lrt "${POLKADOT_SDK_BIN_DIR}" | |
| chmod +x "${ZOMBIENET_BIN_DIR}"/* | |
| ls -lrt "${ZOMBIENET_BIN_DIR}" | |
| echo "${POLKADOT_SDK_BIN_DIR}" >> "$GITHUB_PATH" | |
| echo "SKIP_PARACHAIN_SETUP=1" >> "$GITHUB_ENV" | |
| echo "${ZOMBIENET_BIN_DIR}" >> "$GITHUB_PATH" | |
| echo "ZOMBIENET_BINARY=zombienet-linux-x64" >> "$GITHUB_ENV" | |
| # ======================================================================== | |
| # Westend parachain tests | |
| # ======================================================================== | |
| - name: Start services (Westend parachain) | |
| working-directory: examples | |
| run: | | |
| TEST_DIR="$(mktemp -d $GITHUB_WORKSPACE/bulletin-tests-run-XXXXX)/test" | |
| echo "TEST_DIR=$TEST_DIR" >> "$GITHUB_ENV" | |
| just start-services "$TEST_DIR" "bulletin-westend-runtime" | |
| - name: Test authorize-and-store ws (Westend parachain) | |
| working-directory: examples | |
| run: just run-test-authorize-and-store "${{ env.TEST_DIR }}" "bulletin-westend-runtime" "ws" | |
| - name: Test authorize-and-store smoldot (Westend parachain) | |
| working-directory: examples | |
| run: just run-test-authorize-and-store "${{ env.TEST_DIR }}" "bulletin-westend-runtime" "smoldot" | |
| - name: Test store-chunked-data (Westend parachain) | |
| working-directory: examples | |
| run: just run-test-store-chunked-data "${{ env.TEST_DIR }}" | |
| - name: Test store-big-data (Westend parachain) | |
| working-directory: examples | |
| run: just run-test-store-big-data "${{ env.TEST_DIR }}" | |
| - name: Test authorize-preimage-and-store (Westend parachain) | |
| working-directory: examples | |
| run: just run-test-authorize-preimage-and-store "${{ env.TEST_DIR }}" | |
| - name: Stop services (Westend parachain) | |
| if: always() | |
| working-directory: examples | |
| run: just stop-services "${{ env.TEST_DIR }}" | |
| # ======================================================================== | |
| # Polkadot solochain tests | |
| # ======================================================================== | |
| - name: Start services (Polkadot solochain) | |
| working-directory: examples | |
| run: | | |
| TEST_DIR="$(mktemp -d $GITHUB_WORKSPACE/bulletin-tests-run-XXXXX)/test" | |
| echo "TEST_DIR=$TEST_DIR" >> "$GITHUB_ENV" | |
| just start-services "$TEST_DIR" "bulletin-polkadot-runtime" | |
| - name: Test authorize-and-store ws (Polkadot solochain) | |
| working-directory: examples | |
| run: just run-test-authorize-and-store "${{ env.TEST_DIR }}" "bulletin-polkadot-runtime" "ws" | |
| - name: Test authorize-and-store smoldot (Polkadot solochain) | |
| working-directory: examples | |
| run: just run-test-authorize-and-store "${{ env.TEST_DIR }}" "bulletin-polkadot-runtime" "smoldot" | |
| - name: Test store-chunked-data (Polkadot solochain) | |
| working-directory: examples | |
| run: just run-test-store-chunked-data "${{ env.TEST_DIR }}" | |
| - name: Test store-big-data (Polkadot solochain) | |
| working-directory: examples | |
| run: just run-test-store-big-data "${{ env.TEST_DIR }}" | |
| - name: Test authorize-preimage-and-store (Polkadot solochain) | |
| working-directory: examples | |
| run: just run-test-authorize-preimage-and-store "${{ env.TEST_DIR }}" | |
| - name: Stop services (Polkadot solochain) | |
| if: always() | |
| working-directory: examples | |
| run: just stop-services "${{ env.TEST_DIR }}" | |
| # Collects logs from the last failed zombienet run. | |
| - name: Upload Zombienet logs (on failure) | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: failed-zombienet-logs | |
| path: | | |
| ${{ env.TEST_DIR }}/*.log |