Test #9
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
branches: | |
- main | |
- release-* | |
tags: | |
# YYYYMMDD | |
- "20[0-9][0-9][0-1][0-9][0-3][0-9]*" | |
schedule: | |
- cron: "0 0 * * 1" | |
pull_request: | |
workflow_dispatch: | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
RUSTFLAGS: '--cfg async_executor_impl="async-std" --cfg async_channel_impl="async-std"' | |
RUST_LOG: info,libp2p=off,node=error | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Fix submodule permissions check | |
run: | | |
git config --global --add safe.directory '*' | |
- name: Install Foundry | |
uses: foundry-rs/foundry-toolchain@v1 | |
with: | |
version: nightly-2cb875799419c907cc3709e586ece2559e6b340e # Not using the default version because likely of this bug https://github.com/foundry-rs/foundry/issues/7120 | |
- name: Install just command runner | |
run: | | |
sudo snap install --edge --classic just | |
just --version | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Enable Rust Caching | |
uses: Swatinem/rust-cache@v2 | |
- name: Install capnproto | |
uses: ./.github/actions/install-capnp | |
- name: Test | |
# Build test binary with `testing` feature, which requires `hotshot_example` config | |
run: | | |
export RUSTFLAGS="$RUSTFLAGS --cfg hotshot_example" | |
export PATH="$PWD/target/release:$PATH" | |
cargo build --bin diff-test --release | |
cargo test --release --workspace --all-features --no-run | |
cargo test --release --workspace --all-features --verbose -- --test-threads 1 --nocapture | |
timeout-minutes: 30 |