2022-01-26 23:14:20 +00:00
|
|
|
# Test that local testnet starts successfully.
|
|
|
|
name: local testnet
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- unstable
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
run-local-testnet:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
os:
|
2022-11-13 22:40:44 +00:00
|
|
|
- ubuntu-22.04
|
|
|
|
- macos-12
|
2022-01-26 23:14:20 +00:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
2022-11-13 22:40:44 +00:00
|
|
|
- uses: actions/checkout@v3
|
2022-01-26 23:14:20 +00:00
|
|
|
|
2022-07-15 07:31:19 +00:00
|
|
|
- name: Get latest version of stable Rust
|
|
|
|
run: rustup update stable
|
2022-09-29 01:50:11 +00:00
|
|
|
- name: Install Protoc
|
2022-12-20 01:34:52 +00:00
|
|
|
uses: arduino/setup-protoc@e52d9eb8f7b63115df1ac544a1376fdbf5a39612
|
2022-10-03 23:09:25 +00:00
|
|
|
with:
|
|
|
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
2022-01-26 23:14:20 +00:00
|
|
|
- name: Install ganache
|
2022-03-20 22:48:14 +00:00
|
|
|
run: npm install ganache@latest --global
|
2022-01-26 23:14:20 +00:00
|
|
|
|
|
|
|
# https://github.com/actions/cache/blob/main/examples.md#rust---cargo
|
2022-11-13 22:40:44 +00:00
|
|
|
- uses: actions/cache@v3
|
2022-01-26 23:14:20 +00:00
|
|
|
id: cache-cargo
|
|
|
|
with:
|
|
|
|
path: |
|
|
|
|
~/.cargo/bin/
|
|
|
|
~/.cargo/registry/index/
|
|
|
|
~/.cargo/registry/cache/
|
|
|
|
~/.cargo/git/db/
|
|
|
|
target/
|
|
|
|
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
|
|
|
|
|
|
- name: Install lighthouse
|
|
|
|
run: make && make install-lcli
|
|
|
|
|
|
|
|
- name: Start local testnet
|
2022-07-30 00:22:37 +00:00
|
|
|
run: ./start_local_testnet.sh && sleep 60
|
2022-01-26 23:14:20 +00:00
|
|
|
working-directory: scripts/local_testnet
|
|
|
|
|
|
|
|
- name: Print logs
|
2022-07-30 00:22:37 +00:00
|
|
|
run: ./dump_logs.sh
|
2022-01-26 23:14:20 +00:00
|
|
|
working-directory: scripts/local_testnet
|
|
|
|
|
|
|
|
- name: Stop local testnet
|
|
|
|
run: ./stop_local_testnet.sh
|
|
|
|
working-directory: scripts/local_testnet
|
2022-07-30 00:22:37 +00:00
|
|
|
|
|
|
|
- name: Clean-up testnet
|
|
|
|
run: ./clean.sh
|
|
|
|
working-directory: scripts/local_testnet
|
|
|
|
|
|
|
|
- name: Start local testnet with blinded block production
|
|
|
|
run: ./start_local_testnet.sh -p && sleep 60
|
|
|
|
working-directory: scripts/local_testnet
|
|
|
|
|
|
|
|
- name: Print logs for blinded block testnet
|
|
|
|
run: ./dump_logs.sh
|
|
|
|
working-directory: scripts/local_testnet
|
|
|
|
|
|
|
|
- name: Stop local testnet with blinded block production
|
|
|
|
run: ./stop_local_testnet.sh
|
|
|
|
working-directory: scripts/local_testnet
|