Skip to content

Commit

Permalink
Merge pull request #55 from chenyukang/fix-ci
Browse files Browse the repository at this point in the history
Fix CI to run bruno test when all ports are ready
  • Loading branch information
quake authored Jun 10, 2024
2 parents b9b6c57 + 58721bb commit 0387afe
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
22 changes: 20 additions & 2 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on: [push, pull_request]
name: E2E tests

jobs:
open-update-close-channel:
e2e-testing:
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -33,7 +33,25 @@ jobs:
./tests/nodes/start.sh &
# Wait for the nodes to start, the initialization takes some time
(cd ./tests/bruno; sleep 60; npm exec -- @usebruno/cli run e2e/${{ matrix.workflow }} -r --env test) &
# check port 127.0.0.1:(41714 ~ 41716) are open
for i in {1..20}; do
all_open=true
for port in 41714 41715 41716 8114; do
if ! nc -z 127.0.0.1 $port; then
all_open=false
break
fi
done
if $all_open; then
echo "All ports are open"
break
else
echo "Not all ports are open, waiting 3 seconds before retrying"
sleep 3
fi
done
(cd ./tests/bruno; npm exec -- @usebruno/cli run e2e/${{ matrix.workflow }} -r --env test) &
# -n means we will exit when any of the background processes exits.
# https://www.gnu.org/software/bash/manual/bash.html#index-wait
wait -n
2 changes: 1 addition & 1 deletion src/invoice/invoice_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ macro_rules! attr_getter {
};
}

/// Represents a syntactically and semantically correct lightning BOLT11 invoice.
/// Represents a syntactically and semantically correct lightning BOLT11 invoice
///
/// There are three ways to construct a `CkbInvoice`:
/// 1. using [`CkbInvoiceBuilder`]
Expand Down

0 comments on commit 0387afe

Please sign in to comment.