Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,16 @@ jobs:
- uses: taiki-e/install-action@v2
with:
tool: nextest
- name: Install dependencies
run: |
wget "https://bitcoin.org/bin/bitcoin-core-27.0/bitcoin-27.0-x86_64-linux-gnu.tar.gz"
tar -xvaf "bitcoin-27.0-x86_64-linux-gnu.tar.gz"
echo "$(pwd)/bitcoin-27.0/bin" >> $GITHUB_PATH
wget "https://github.com/lightningnetwork/lnd/releases/download/v0.18.0-beta/lnd-linux-amd64-v0.18.0-beta.tar.gz"
tar -xvaf "lnd-linux-amd64-v0.18.0-beta.tar.gz"
echo "$(pwd)/lnd-linux-amd64-v0.18.0-beta" >> $GITHUB_PATH
- run: |
RUST_BACKTRACE=full RUST_LOG=trace,fnn=trace,fnn::cch::actor::tracker=off,fnn::fiber::gossip=off,tentacle=off,tokio_yamux=off,tentacle_secio=off cargo nextest run --no-fail-fast
RUST_BACKTRACE=full RUST_LOG=trace,fnn=trace,fnn::cch::actor::tracker=off,fnn::fiber::gossip=off,tentacle=off,tokio_yamux=off,tentacle_secio=off cargo nextest run --no-fail-fast --features lnd-tests

fmt:
name: Rustfmt
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
- udt
- reestablish
- cross-chain-hub
- cross-chain-hub-separate
- router-pay
- udt-router-pay
- watchtower
Expand Down Expand Up @@ -60,7 +61,7 @@ jobs:
wget "https://github.com/nervosnetwork/ckb/releases/download/v${version}/ckb_v${version}_x86_64-unknown-linux-gnu-portable.tar.gz"
tar -xvaf "ckb_v${version}_x86_64-unknown-linux-gnu-portable.tar.gz"
sudo mv "ckb_v${version}_x86_64-unknown-linux-gnu-portable"/* /usr/local/bin/
if [ ${{ matrix.workflow }} = "cross-chain-hub" ]; then
if [[ "${{ matrix.workflow }}" = cross-chain-hub* ]]; then
wget "https://bitcoin.org/bin/bitcoin-core-27.0/bitcoin-27.0-x86_64-linux-gnu.tar.gz"
tar -xvaf "bitcoin-27.0-x86_64-linux-gnu.tar.gz"
echo "$(pwd)/bitcoin-27.0/bin" >> $GITHUB_PATH
Expand All @@ -82,13 +83,15 @@ jobs:
export ON_GITHUB_ACTION=y
# Pass it to tests/funding-tx-builder as args
export EXTRA_BRU_ARGS="${{ matrix.extra_bru_args }}"

port_file=./tests/nodes/.ports
rm -f "$port_file"
./tests/nodes/start.sh "e2e/${{ matrix.workflow }}" &

# Wait for the nodes to start, the initialization takes some time
# check all the ports are open

# when .ports file is not generated, we will retry 20 times to check if all ports are open
port_file=./tests/nodes/.ports
retry_count=0
while [ $retry_count -lt 100 ]; do
if [ -f $port_file ]; then
Expand All @@ -105,6 +108,7 @@ jobs:
ports+=("$line")
done < ./tests/nodes/.ports

cat ./tests/nodes/.ports_map
echo "Checking if all ports are open ... ${ports[@]}"

try_number=120
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
/tests/nodes/*/dev.toml
/tests/nodes/*.log
/tests/deploy/udt-init/target
tests/nodes/.ports
/tests/nodes/.ports
/tests/nodes/.ports_map
/tests/nodes/.ports_tmp
/coverage-report
/*.info
.vscode
Expand Down
Loading
Loading