Skip to content

feat: add tests for aggchain contracts client #320

feat: add tests for aggchain contracts client

feat: add tests for aggchain contracts client #320

Workflow file for this run

name: Test - units
on:
push:
branches:
- main
pull_request:
branches:
- "**"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_id || github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
jobs:
isolated-feature-checks:
name: 'isolated feature checks'
runs-on: ubuntu-latest-16-cores
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- uses: taiki-e/install-action@v2
with:
tool: protoc,cargo-hack
- run: cargo hack --each-feature --all check
unit:
name: Unit Tests
runs-on: ubuntu-latest-16-cores
timeout-minutes: 30
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
- name: Set up rust cache
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- name: Install SP1UP
run: curl -L https://sp1.succinct.xyz | bash
- name: Install SP1 toolchain
run: /home/runner/.sp1/bin/sp1up
shell: bash
- uses: taiki-e/install-action@v2
with:
tool: nextest,protoc
- name: Install Anvil
uses: foundry-rs/foundry-toolchain@v1
- name: Test
run: cargo nextest run --workspace && cargo test --doc --workspace
check_elf:
runs-on: ubuntu-latest-16-cores
if: ${{ contains('["merge_group", "workflow_dispatch"]', github.event_name) }}
name: ELF Checking
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Define source checksum
run: |
echo CHECKSUM="$(sha256sum crates/aggchain-proof-program/elf/riscv32im-succinct-zkvm-elf | awk '{ print $1 }')" >> "$GITHUB_ENV"
- name: Install toolchain
uses: dtolnay/rust-toolchain@stable
- name: Set up rust cache
uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.ref == 'refs/heads/main' }}
- uses: taiki-e/install-action@protoc
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- uses: taiki-e/install-action@protoc
- name: Install cargo-make
run: cargo install --debug --locked cargo-make
- run: cargo make ap-elf
- name: ELF is up to date
run: diff <(sha256sum crates/aggchain-proof-program/elf/riscv32im-succinct-zkvm-elf | awk '{ print $1 }') <( echo $CHECKSUM )