From b933f99285c0211711a078c57ad603e51a17eea7 Mon Sep 17 00:00:00 2001 From: Alfredo Garcia Date: Mon, 24 Oct 2022 20:38:48 -0300 Subject: [PATCH] ci(getblocktemplate): run getblocktemplate-rpcs feature tests in CI (#5435) * test all features * increase task timeout * add a new task for feature tests * add `getblocktemplate-rpcs` tests to docker integration * run the getblocktemplate-rpcs feature as a separated step in docker * move getblocktemplate-rpcs in docker as a separated task --- .../continous-integration-docker.yml | 24 +++++++++++++++++-- .../workflows/continous-integration-os.yml | 6 +++++ 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/.github/workflows/continous-integration-docker.yml b/.github/workflows/continous-integration-docker.yml index 1e782bb0..4b81eb00 100644 --- a/.github/workflows/continous-integration-docker.yml +++ b/.github/workflows/continous-integration-docker.yml @@ -180,7 +180,8 @@ jobs: # Run all the zebra tests, including tests that are ignored by default. # Skips tests that need a cached state disk or a lightwalletd binary. # - # (We activate the gRPC feature to avoid recompiling `zebrad`, but we don't actually run any gRPC tests.) + # - We run all the tests behind the `getblocktemplate-rpcs` feature as a separated step. + # - We activate the gRPC feature to avoid recompiling `zebrad`, but we don't actually run any gRPC tests. test-all: name: Test all runs-on: ubuntu-latest @@ -195,7 +196,26 @@ jobs: - name: Run all zebrad tests run: | docker pull ${{ env.GAR_BASE }}/${{ env.IMAGE_NAME }}:sha-${{ env.GITHUB_SHA_SHORT }} - docker run --name zebrad-tests -t ${{ env.GAR_BASE }}/${{ env.IMAGE_NAME }}:sha-${{ env.GITHUB_SHA_SHORT }} cargo test --locked --release --features lightwalletd-grpc-tests --workspace -- --nocapture --include-ignored + docker run --name zebrad-tests -t ${{ env.GAR_BASE }}/${{ env.IMAGE_NAME }}:sha-${{ env.GITHUB_SHA_SHORT }} cargo test --locked --release --features "lightwalletd-grpc-tests" --workspace -- --nocapture --include-ignored + + # zebrad tests without cached state with `getblocktemplate-rpcs` feature + + # Same as above but we run all the tests behind the `getblocktemplate-rpcs` feature. + test-all-getblocktemplate-rpcs: + name: Test all with getblocktemplate-rpcs feature + runs-on: ubuntu-latest + needs: build + if: ${{ github.event.inputs.regenerate-disks != 'true' && github.event.inputs.run-full-sync != 'true' && github.event.inputs.run-lwd-sync != 'true' }} + steps: + - name: Inject slug/short variables + uses: rlespinasse/github-slug-action@v4 + with: + short-length: 7 + + - name: Run all zebrad tests + run: | + docker pull ${{ env.GAR_BASE }}/${{ env.IMAGE_NAME }}:sha-${{ env.GITHUB_SHA_SHORT }} + docker run --name zebrad-tests -t ${{ env.GAR_BASE }}/${{ env.IMAGE_NAME }}:sha-${{ env.GITHUB_SHA_SHORT }} cargo test --locked --release --features "lightwalletd-grpc-tests getblocktemplate-rpcs" --workspace -- --nocapture --include-ignored # Run state tests with fake activation heights. # diff --git a/.github/workflows/continous-integration-os.yml b/.github/workflows/continous-integration-os.yml index 3e58c0b3..23a5c53b 100644 --- a/.github/workflows/continous-integration-os.yml +++ b/.github/workflows/continous-integration-os.yml @@ -167,6 +167,12 @@ jobs: command: test args: --verbose --workspace -- --nocapture + - name: Run tests with getblocktemplate-rpcs feature + uses: actions-rs/cargo@v1.0.3 + with: + command: test + args: --features getblocktemplate-rpcs --verbose --workspace -- --nocapture + # Explicitly run any tests that are usually #[ignored] - name: Run zebrad large sync tests