Skip to content

Commit

Permalink
Check workspace members with default features individually in CI
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
tnull committed Sep 16, 2024
1 parent 98b769a commit 6b5994e
Showing 1 changed file with 23 additions and 3 deletions.
26 changes: 23 additions & 3 deletions ci/ci-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,31 @@ PIN_RELEASE_DEPS # pin the release dependencies in our main workspace

export RUST_BACKTRACE=1

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

echo -e "\n\nBuilding and testing Block Sync Clients with features"
WORKSPACE_MEMBERS=(
lightning
lightning-types
lightning-block-sync
lightning-invoice
lightning-net-tokio
lightning-persister
lightning-background-processor
lightning-rapid-gossip-sync
lightning-custom-message
lightning-transaction-sync
possiblyrandom
)

echo -e "\n\nChecking, testing, and building docs for all workspace members individually..."
for DIR in "${WORKSPACE_MEMBERS[@]}"; do
cargo test -p "$DIR" --verbose --color always
cargo check -p "$DIR" --verbose --color always
cargo doc -p "$DIR" --document-private-items
done

echo -e "\n\nChecking and testing Block Sync Clients with features"

cargo test -p lightning-block-sync --verbose --color always --features rest-client
cargo check -p lightning-block-sync --verbose --color always --features rest-client
Expand Down

0 comments on commit 6b5994e

Please sign in to comment.