Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci(getblocktemplate): run getblocktemplate-rpcs feature tests in CI #5435

Merged
merged 6 commits into from
Oct 24, 2022
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
24 changes: 22 additions & 2 deletions .github/workflows/continous-integration-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
teor2345 marked this conversation as resolved.
Show resolved Hide resolved

# Run state tests with fake activation heights.
#
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/continous-integration-os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down