Skip to content

Commit 43bc78c

Browse files
committed
Disallow skipping tx-sync tests in CI
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.
1 parent fc21640 commit 43bc78c

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
echo "ELECTRS_EXE=$( pwd )/bin/electrs-${{ runner.os }}-${{ runner.arch }}" >> "$GITHUB_ENV"
6767
- name: Run CI script
6868
shell: bash # Default on Winblows is powershell
69-
run: CI_MINIMIZE_DISK_USAGE=1 ./ci/ci-tests.sh
69+
run: CI_ENV=1 CI_MINIMIZE_DISK_USAGE=1 ./ci/ci-tests.sh
7070

7171
coverage:
7272
strategy:

ci/ci-tests.sh

+11-9
Original file line numberDiff line numberDiff line change
@@ -44,22 +44,24 @@ cargo check --verbose --color always --features rpc-client,rest-client,tokio
4444
popd
4545

4646
if [[ "$HOST_PLATFORM" != *windows* ]]; then
47-
if [ -z "$BITCOIND_EXE" ] || [ -z "$ELECTRS_EXE" ]; then
47+
pushd lightning-transaction-sync
48+
echo -e "\n\nChecking Transaction Sync Clients with features."
49+
cargo check --verbose --color always --features esplora-blocking
50+
cargo check --verbose --color always --features esplora-async
51+
cargo check --verbose --color always --features esplora-async-https
52+
cargo check --verbose --color always --features electrum
53+
54+
if [ -z "$CI_ENV" ] && [[ -z "$BITCOIND_EXE" || -z "$ELECTRS_EXE" ]]; then
4855
echo -e "\n\nSkipping testing Transaction Sync Clients due to BITCOIND_EXE or ELECTRS_EXE being unset."
56+
cargo check --tests
4957
else
50-
echo -e "\n\nBuilding and testing Transaction Sync Clients with features"
51-
pushd lightning-transaction-sync
52-
58+
echo -e "\n\nTesting Transaction Sync Clients with features."
5359
cargo test --verbose --color always --features esplora-blocking
54-
cargo check --verbose --color always --features esplora-blocking
5560
cargo test --verbose --color always --features esplora-async
56-
cargo check --verbose --color always --features esplora-async
5761
cargo test --verbose --color always --features esplora-async-https
58-
cargo check --verbose --color always --features esplora-async-https
5962
cargo test --verbose --color always --features electrum
60-
cargo check --verbose --color always --features electrum
61-
popd
6263
fi
64+
popd
6365
fi
6466

6567
echo -e "\n\nTest futures builds"

0 commit comments

Comments
 (0)