Skip to content

Test sequencer

Test sequencer #62

name: Test sequencer
on:
schedule:
# Monday midnight
- cron: '0 0 * * 1'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ (github.ref == 'refs/heads/main' && github.run_number) || github.ref }}
cancel-in-progress: true
jobs:
test-sequencer:
runs-on: ubuntu-latest
name: Test sequencer
steps:
- uses: actions/checkout@v4
name: Checkout Repository
with:
path: hotshot
- uses: actions/checkout@v4
name: Checkout Sequencer Repository
with:
repository: EspressoSystems/espresso-sequencer
path: sequencer
submodules: true
- name: Install Rust
uses: mkroening/rust-toolchain-toml@main
- uses: Swatinem/rust-cache@v2
name: Enable Rust Caching
with:
shared-key: ""
prefix-key: sequencer
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
# TODO: remove version pinning once sequencer repository does that
with:
version: "nightly-60ec00296f00754bc21ed68fd05ab6b54b50e024"
- name: Patch sequencer dependencies
run: |
mkdir -p .cargo
cat << EOF > .cargo/config.toml
[patch.'https://github.com/EspressoSystems/hotshot']
hotshot = { path = "${GITHUB_WORKSPACE}/hotshot/crates/hotshot" }
hotshot-constants = { path = "${GITHUB_WORKSPACE}/hotshot/crates/constants" }
hotshot-qc = { path = "${GITHUB_WORKSPACE}/hotshot/crates/hotshot-qc" }
hotshot-signature-key = { path = "${GITHUB_WORKSPACE}/hotshot/crates/hotshot-signature-key" }
hotshot-stake-table = { path = "${GITHUB_WORKSPACE}/hotshot/crates/hotshot-stake-table" }
hotshot-state-prover = { path = "${GITHUB_WORKSPACE}/hotshot/crates/hotshot-state-prover" }
hotshot-orchestrator = { path = "${GITHUB_WORKSPACE}/hotshot/crates/orchestrator" }
hotshot-web-server = { path = "${GITHUB_WORKSPACE}/hotshot/crates/web_server" }
hotshot-task-impls = { path = "${GITHUB_WORKSPACE}/hotshot/crates/task-impls" }
hotshot-testing = { path = "${GITHUB_WORKSPACE}/hotshot/crates/testing" }
libp2p-networking = { path = "${GITHUB_WORKSPACE}/hotshot/crates/libp2p-networking" }
EOF
- name: Build sequencer tests
working-directory: sequencer
run: |
cargo test --release --workspace --all-features --no-run
- name: Run sequencer tests
working-directory: sequencer
run: |
cargo test --release --workspace --all-features --verbose -- --test-threads 1 --nocapture