change(ci): Split experimental feature tests into their own step (#8039)
* Split experimental feature tests into their own step * Only log a checkpoint error warning once
This commit is contained in:
parent
d3dc7d0f0e
commit
05a28b97f2
|
@ -124,17 +124,26 @@ jobs:
|
||||||
# If some tests hang, add "-- --nocapture" for just that test, or for all the tests.
|
# If some tests hang, add "-- --nocapture" for just that test, or for all the tests.
|
||||||
#
|
#
|
||||||
# TODO: move this test command into entrypoint.sh
|
# TODO: move this test command into entrypoint.sh
|
||||||
# add a separate experimental workflow job if this job is slow
|
|
||||||
- name: Run zebrad tests
|
- name: Run zebrad tests
|
||||||
|
env:
|
||||||
|
NETWORK: ${{ inputs.network || vars.ZCASH_NETWORK }}
|
||||||
run: |
|
run: |
|
||||||
docker pull ${{ vars.GAR_BASE }}/${{ vars.CI_IMAGE_NAME }}@${{ needs.build.outputs.image_digest }}
|
docker pull ${{ vars.GAR_BASE }}/${{ vars.CI_IMAGE_NAME }}@${{ needs.build.outputs.image_digest }}
|
||||||
docker run -e NETWORK --name zebrad-tests --tty ${{ vars.GAR_BASE }}/${{ vars.CI_IMAGE_NAME }}@${{ needs.build.outputs.image_digest }} cargo test --locked --release --features "${{ env.TEST_FEATURES }}" --workspace -- --include-ignored
|
docker run -e NETWORK --name zebrad-tests --tty ${{ vars.GAR_BASE }}/${{ vars.CI_IMAGE_NAME }}@${{ needs.build.outputs.image_digest }} cargo test --locked --release --features "${{ env.TEST_FEATURES }}" --workspace -- --include-ignored
|
||||||
# Currently GitHub doesn't allow empty variables
|
|
||||||
if [[ -n "${{ vars.RUST_EXPERIMENTAL_FEATURES }}" && "${{ vars.RUST_EXPERIMENTAL_FEATURES }}" != " " ]]; then
|
# Run unit, basic acceptance tests, and ignored tests with experimental features.
|
||||||
docker run -e NETWORK --name zebrad-tests-experimental --tty ${{ vars.GAR_BASE }}/${{ vars.CI_IMAGE_NAME }}@${{ needs.build.outputs.image_digest }} cargo test --locked --release --features "${{ env.EXPERIMENTAL_FEATURES }} " --workspace -- --include-ignored
|
#
|
||||||
fi
|
# TODO: move this test command into entrypoint.sh
|
||||||
|
- name: Run zebrad tests with experimental features
|
||||||
env:
|
env:
|
||||||
NETWORK: ${{ inputs.network || vars.ZCASH_NETWORK }}
|
NETWORK: ${{ inputs.network || vars.ZCASH_NETWORK }}
|
||||||
|
run: |
|
||||||
|
# GitHub doesn't allow empty variables
|
||||||
|
if [[ -n "${{ vars.RUST_EXPERIMENTAL_FEATURES }}" && "${{ vars.RUST_EXPERIMENTAL_FEATURES }}" != " " ]]; then
|
||||||
|
docker run -e NETWORK --name zebrad-tests-experimental --tty ${{ vars.GAR_BASE }}/${{ vars.CI_IMAGE_NAME }}@${{ needs.build.outputs.image_digest }} cargo test --locked --release --features "${{ env.EXPERIMENTAL_FEATURES }} " --workspace -- --include-ignored
|
||||||
|
else
|
||||||
|
echo "Experimental builds are disabled, set RUST_EXPERIMENTAL_FEATURES in GitHub actions variables to enable them"
|
||||||
|
fi
|
||||||
|
|
||||||
# Run state tests with fake activation heights.
|
# Run state tests with fake activation heights.
|
||||||
#
|
#
|
||||||
|
|
|
@ -264,6 +264,7 @@ where
|
||||||
//
|
//
|
||||||
// <https://zips.z.cash/protocol/protocol.pdf#blockchain>
|
// <https://zips.z.cash/protocol/protocol.pdf#blockchain>
|
||||||
let full_checkpoints = CheckpointList::new(network);
|
let full_checkpoints = CheckpointList::new(network);
|
||||||
|
let mut already_warned = false;
|
||||||
|
|
||||||
for (height, checkpoint_hash) in full_checkpoints.iter() {
|
for (height, checkpoint_hash) in full_checkpoints.iter() {
|
||||||
let checkpoint_state_service = checkpoint_state_service.clone();
|
let checkpoint_state_service = checkpoint_state_service.clone();
|
||||||
|
@ -298,20 +299,14 @@ where
|
||||||
unreachable!("unexpected response type: {response:?} from state request")
|
unreachable!("unexpected response type: {response:?} from state request")
|
||||||
}
|
}
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
#[cfg(not(test))]
|
// This error happens a lot in some tests, and it could happen to users.
|
||||||
tracing::warn!(
|
if !already_warned {
|
||||||
"unexpected error: {e:?} in state request while verifying previous \
|
tracing::warn!(
|
||||||
state checkpoints. Is Zebra shutting down?"
|
"unexpected error: {e:?} in state request while verifying previous \
|
||||||
);
|
state checkpoints. Is Zebra shutting down?"
|
||||||
// This error happens a lot in some tests.
|
);
|
||||||
//
|
already_warned = true;
|
||||||
// TODO: fix the tests so they don't cause this error,
|
}
|
||||||
// or change the tracing filter
|
|
||||||
#[cfg(test)]
|
|
||||||
tracing::debug!(
|
|
||||||
"unexpected error: {e:?} in state request while verifying previous \
|
|
||||||
state checkpoints. Is Zebra shutting down?"
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue