Skip to content

Commit 9f56e72

Browse files
committed
Tie electrsd into CI
During import of `electrsd` I just clobbered all CI. Add `electrsd` to the CI infrastructure in this repo. Use `extra_tests.sh` to mirror the behaviour in the original repo _excluding_ the no-download test. Skipping the no-download test because I'm too lazy to set it up, we don't test no-download in `corepc-node` either.
1 parent 9aa035f commit 9f56e72

File tree

2 files changed

+63
-0
lines changed

2 files changed

+63
-0
lines changed

electrsd/contrib/extra_tests.sh

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
#!/usr/bin/env bash
2+
#
3+
# Additional tests for `electrs`.
4+
#
5+
# This script was written based on CI in
6+
# `github.com/RCasatta/electrsd` when the crate was imported to this repo.
7+
# (HEAD on that repo was: dc88d81520c9ec507fc830b88a3b92a034dbaf93).
8+
9+
set -euox pipefail
10+
11+
# Use the current `Cargo.lock` file without updating it.
12+
cargo="cargo --locked"
13+
14+
15+
main() {
16+
corepc_node_versions
17+
electrs_versions
18+
electrs_esplora
19+
}
20+
21+
corepc_node_versions() {
22+
local corepc_node_versions=("corepc-node_29_0" "corepc-node_28_2" "corepc-node_27_2" "corepc-node_26_2" "corepc-node_25_2")
23+
24+
for feature in "${corepc_node_versions}"; do
25+
$cargo test --features="$feature,electrs_0_10_6"
26+
done
27+
}
28+
29+
electrs_versions() {
30+
local electrs_versions=("electrs_0_10_6" "electrs_0_9_11" "electrs_0_9_1" "electrs_0_8_10")
31+
32+
for feature in "${electrs_versions}"; do
33+
$cargo test --features="corepc-node_29_0,$feature"
34+
done
35+
}
36+
37+
electrs_esplora() {
38+
$cargo test --features="corepc-node_22_1,legacy,esplora_a33e97e1"
39+
}
40+
41+
#
42+
# Main script
43+
#
44+
main "$@"
45+
exit 0

electrsd/contrib/test_vars.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# No shebang, this file should not be executed.
2+
# shellcheck disable=SC2148
3+
#
4+
# disable verify unused vars, despite the fact that they are used when sourced
5+
# shellcheck disable=SC2034
6+
7+
# Test all these features with "std" enabled.
8+
FEATURES_WITH_STD=""
9+
10+
# Test all these features without "std" or "alloc" enabled.
11+
FEATURES_WITHOUT_STD=""
12+
13+
# Run these examples.
14+
EXAMPLES=""
15+
16+
# Just check the latest minor version of the last three supported Core versions.
17+
# This is mainly for docs and MSRV - integration tests will catch any other errors.
18+
EXACT_FEATURES=("download,28_2" "download,27_2" "download,26_2")

0 commit comments

Comments
 (0)