Disallow skipping tx-sync tests in CI#3240
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #3240 +/- ##
==========================================
+ Coverage 89.74% 91.01% +1.26%
==========================================
Files 122 127 +5
Lines 101921 114325 +12404
Branches 101921 114325 +12404
==========================================
+ Hits 91470 104052 +12582
+ Misses 7763 7684 -79
+ Partials 2688 2589 -99 ☔ View full report in Codecov by Sentry. |
|
|
||
| if [[ "$HOST_PLATFORM" != *windows* ]]; then | ||
| if [ -z "$BITCOIND_EXE" ] || [ -z "$ELECTRS_EXE" ]; then | ||
| if [ -z "$CI_ENV" ] && [ -z "$BITCOIND_EXE" ] || [ -z "$ELECTRS_EXE" ]; then |
There was a problem hiding this comment.
Can we add ()s (IIRC more []s)? I dunno how to read whether ELECTRS_EXE overrides CI_ENV or not.
There was a problem hiding this comment.
Can we add ()s (IIRC more []s)? I dunno how to read whether ELECTRS_EXE overrides CI_ENV or not.
Heh, neither exactly, but now switched to [[ .. ]] which allows grouping. Seems shellcheck is fine with it. 🤷♂️
bf79d8c to
7883f50
Compare
7883f50 to
3571095
Compare
|
Force-pushed the following changes: > git diff-tree -U2 7883f502f 35710958f
diff --git a/ci/ci-tests.sh b/ci/ci-tests.sh
index 1a912016e..a0dc27d5a 100755
--- a/ci/ci-tests.sh
+++ b/ci/ci-tests.sh
@@ -45,20 +45,21 @@ popd
if [[ "$HOST_PLATFORM" != *windows* ]]; then
+ pushd lightning-transaction-sync
+ echo -e "\n\nChecking Transaction Sync Clients with features."
+ cargo check --verbose --color always --features esplora-blocking
+ cargo check --verbose --color always --features esplora-async
+ cargo check --verbose --color always --features esplora-async-https
+ cargo check --verbose --color always --features electrum
+
if [ -z "$CI_ENV" ] && [[ -z "$BITCOIND_EXE" || -z "$ELECTRS_EXE" ]]; then
echo -e "\n\nSkipping testing Transaction Sync Clients due to BITCOIND_EXE or ELECTRS_EXE being unset."
else
- echo -e "\n\nBuilding and testing Transaction Sync Clients with features"
- pushd lightning-transaction-sync
-
+ echo -e "\n\nTesting Transaction Sync Clients with features."
cargo test --verbose --color always --features esplora-blocking
- cargo check --verbose --color always --features esplora-blocking
cargo test --verbose --color always --features esplora-async
- cargo check --verbose --color always --features esplora-async
cargo test --verbose --color always --features esplora-async-https
- cargo check --verbose --color always --features esplora-async-https
cargo test --verbose --color always --features electrum
- cargo check --verbose --color always --features electrum
- popd
fi
+ popd
fi |
Previously, we'd always skip tx-sync tests if the `BITCOIND_EXE`/`ELECTRS_EXE` environment variables would be unset. While this is especially fine for local testing, we still want to enforce tests failing if somehow the `bitcoind`/`electrs` downloading or caching in CI stops working. Here, we therefore add a `CI_ENV` variable that indicates we're indeed running in CI, and only skip if it's unset.
3571095 to
43bc78c
Compare
|
Force-pushed once more: > git diff-tree -U2 35710958f 43bc78ce3
diff --git a/ci/ci-tests.sh b/ci/ci-tests.sh
index a0dc27d5a..43d6aeaa4 100755
--- a/ci/ci-tests.sh
+++ b/ci/ci-tests.sh
@@ -54,4 +54,5 @@ if [[ "$HOST_PLATFORM" != *windows* ]]; then
if [ -z "$CI_ENV" ] && [[ -z "$BITCOIND_EXE" || -z "$ELECTRS_EXE" ]]; then
echo -e "\n\nSkipping testing Transaction Sync Clients due to BITCOIND_EXE or ELECTRS_EXE being unset."
+ cargo check --tests
else
echo -e "\n\nTesting Transaction Sync Clients with features." |
TheBlueMatt
left a comment
There was a problem hiding this comment.
Thanks! Just gonna land this cause its CI-specific and trivial
Minor follow-up to #3020.
Previously, we'd always skip tx-sync tests if the
BITCOIND_EXE/ELECTRS_EXEenvironment variables would be unset. While this is especially fine for local testing, we still want to enforce tests failing if somehow thebitcoind/electrsdownloading or caching in CI stops working. Here, we therefore add aCI_ENVvariable that indicates we're indeed running in CI, and only skip if it's unset.