Skip to content

Commit a3142f7

Browse files
committed
Check workspace members with default features individually in CI
Previously, we would only check the workspace as a whole. This however would mean that we would check/test crates with `lightning`'s default features enabled, allowing failures-to-build under the crates own default features to slip through, if they didn't explicitly enable `lightning/std`, for example. Here, we extend the CI to check the workspace as a whole but then run checks, tests, and doc generation on the workspace members individually, asserting that all of them build even when not built as part of the same workspace as `lightning`.
1 parent 782c787 commit a3142f7

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

ci/ci-tests.sh

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,31 @@ PIN_RELEASE_DEPS # pin the release dependencies in our main workspace
2727

2828
export RUST_BACKTRACE=1
2929

30-
echo -e "\n\nBuilding and testing all workspace crates..."
31-
cargo test --verbose --color always
30+
echo -e "\n\nChecking the full workspace."
3231
cargo check --verbose --color always
3332

34-
echo -e "\n\nBuilding and testing Block Sync Clients with features"
33+
WORKSPACE_MEMBERS=(
34+
lightning
35+
lightning-types
36+
lightning-block-sync
37+
lightning-invoice
38+
lightning-net-tokio
39+
lightning-persister
40+
lightning-background-processor
41+
lightning-rapid-gossip-sync
42+
lightning-custom-message
43+
lightning-transaction-sync
44+
possiblyrandom
45+
)
46+
47+
echo -e "\n\nChecking, testing, and building docs for all workspace members individually..."
48+
for DIR in "${WORKSPACE_MEMBERS[@]}"; do
49+
cargo test -p "$DIR" --verbose --color always
50+
cargo check -p "$DIR" --verbose --color always
51+
cargo doc -p "$DIR" --document-private-items
52+
done
53+
54+
echo -e "\n\nChecking and testing Block Sync Clients with features"
3555

3656
cargo test -p lightning-block-sync --verbose --color always --features rest-client
3757
cargo check -p lightning-block-sync --verbose --color always --features rest-client

0 commit comments

Comments
 (0)