Skip to content

partition slow test #1727

partition slow test

partition slow test #1727

Workflow file for this run

name: Slow 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: ${{ !contains(github.ref, 'main')}}
# Build test binary with `testing` feature, which requires `hotshot_example` config
env:
CARGO_TERM_COLOR: always
RUST_LOG: info,libp2p=off,node=error
jobs:
build-test-artifacts:
name: Build test artifacts
runs-on: buildjet-8vcpu-ubuntu-2204
steps:
- uses: rui314/setup-mold@v1
- uses: actions/checkout@v4
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Enable Rust Caching
uses: Swatinem/rust-cache@v2
with:
cache-all-crates: true
cache-provider: buildjet
- name: Build and archive tests
run: cargo nextest archive --locked --workspace --all-features --archive-file nextest-archive.tar.zst
- name: Upload archive to workflow
uses: actions/upload-artifact@v4
with:
name: nextest-archive
path: nextest-archive.tar.zst
build-diff-test:
name: Build Diff Test
runs-on: buildjet-8vcpu-ubuntu-2204
steps:
- uses: rui314/setup-mold@v1
- uses: actions/checkout@v4
- name: Enable Rust Caching
uses: Swatinem/rust-cache@v2
with:
cache-all-crates: true
cache-provider: buildjet
- name: Build and archive tests
run: cargo build --locked --bin diff-test --release
- name: Upload archive to workflow
uses: actions/upload-artifact@v4
with:
name: diff-test
path: target/release/diff-test
slow-tests:
needs: [build-diff-test, build-test-artifacts]
runs-on: ubuntu-latest
strategy:
matrix:
partition: [1, 2, 3, 4]
steps:
# These tests need the `anvil` binary provided by foundry
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
- name: Install nextest
uses: taiki-e/install-action@nextest
- name: Checkout Repository
uses: actions/checkout@v4
- name: Download archive
uses: actions/download-artifact@v4
- name: Move files
run: |
mv nextest-archive/* .
mkdir -p target/release
mv diff-test/* target/release
chmod -c +x target/release/*
- name: Configure Environment
run: PATH="$PWD/target/release:$PATH"
- name: Slow Test
env:
NEXTEST_PROFILE: slow
run: |
cargo nextest run --archive-file nextest-archive.tar.zst --verbose --no-fail-fast --nocapture \
--workspace-remap $PWD --partition count:${{ matrix.partition }}/4
timeout-minutes: 40