Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Basic E2E CI support #40

Merged
merged 2 commits into from
Jun 5, 2024
Merged
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
39 changes: 39 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
on: [push, pull_request]

name: E2E tests

jobs:
open-update-close-channel:
strategy:
fail-fast: false
matrix:
workflow:
- 3-nodes-transfer
- invoice-ops
- open-use-close-a-channel
release:
- "0.116.1"
name: e2e test for ${{ matrix.workflow }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: Swatinem/rust-cache@v2
- uses: dsherret/rust-toolchain-file@v1
- name: Install dependencies
run: |
version=${{ matrix.release }}
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/

- name: Start nodes
run: |
# Prebuild the program so that we can run the following script faster
cargo build
./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) &
# -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
4 changes: 3 additions & 1 deletion tests/nodes/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,6 @@ else
done
fi

wait
# -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
Loading