From a62d6d31ebba07a7886d3f4be33d7e070889c906 Mon Sep 17 00:00:00 2001 From: rzadp Date: Thu, 8 Aug 2024 18:12:40 +0200 Subject: [PATCH] Give me a test for producing blocks --- .github/workflows/ci.yml | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf6dfb2..be542a8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,7 @@ on: branches: - main - master + - rzadp/test-produce-blocks concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} @@ -50,24 +51,6 @@ jobs: large-packages: false swap-storage: false - - name: Build the template - run: cargo build - timeout-minutes: 90 - - - name: Run clippy - run: | - SKIP_WASM_BUILD=1 cargo clippy --all-targets --locked --workspace --quiet - SKIP_WASM_BUILD=1 cargo clippy --all-targets --all-features --locked --workspace --quiet - timeout-minutes: 30 - - - name: Run the tests - run: SKIP_WASM_BUILD=1 cargo test - timeout-minutes: 15 - - - name: Build the docs - run: SKIP_WASM_BUILD=1 cargo doc --workspace --no-deps - timeout-minutes: 15 - # This is mentioned as example in the README: - name: Build the node individually in release mode run: | @@ -76,6 +59,14 @@ jobs: cargo build --package minimal-template-node --release timeout-minutes: 90 + - name: Make sure the node is producing blocks + run: | + ./target/release/minimal-template-node --dev 2>&1 | tee out.txt & + until curl -s '127.0.0.1:9944'; do sleep 5; done + until curl -s 'cat out.txt | grep -s "Imported #2"'; do sleep 5; done + shell: bash + timeout-minutes: 5 + build-docker: runs-on: ubuntu-latest steps: