-
Notifications
You must be signed in to change notification settings - Fork 86
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve runtime of tests #1854
Improve runtime of tests #1854
Changes from 29 commits
58ec3cd
8e223df
a31ccef
45c3d79
4190d16
25de9ea
b3e14f0
4d3e749
97f477e
8ef47fa
5abed7f
4fb32e2
76117bb
8e91d53
d40f2fa
c225e4d
10005c6
7622602
9d394c3
f1796ef
aed01e9
41278cf
b672cfc
284d97f
c8f18a4
c093376
0874381
c1cd5f5
39d2e88
5a609df
a7d14fd
5494139
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: SlowEst | ||
|
||
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 | ||
sveitser marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
env: | ||
RUSTFLAGS: '--cfg async_executor_impl="async-std" --cfg async_channel_impl="async-std"' | ||
RUST_LOG: info,libp2p=off,node=error | ||
|
||
jobs: | ||
slowest: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Or is "slowest" chosen on purpose? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. I was it was a play on |
||
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 | ||
|
||
- uses: taiki-e/install-action@nextest | ||
|
||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Enable Rust Caching | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Build | ||
# 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 --locked --bin diff-test --release | ||
cargo nextest run --locked --release --workspace --all-features --no-run | ||
timeout-minutes: 90 | ||
|
||
- name: SlowEst | ||
env: | ||
CARGO_TERM_COLOR: always | ||
# 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 nextest run --locked --release --workspace --all-features --verbose -E 'test(slow_)' | ||
timeout-minutes: 25 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,10 +34,7 @@ jobs: | |
with: | ||
version: nightly | ||
|
||
- name: Install just command runner | ||
run: | | ||
sudo snap install --edge --classic just | ||
just --version | ||
- uses: taiki-e/install-action@nextest | ||
|
||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
@@ -47,12 +44,21 @@ jobs: | |
- name: Enable Rust Caching | ||
uses: Swatinem/rust-cache@v2 | ||
|
||
- name: Test | ||
- name: Build | ||
# 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 --locked --bin diff-test --release | ||
cargo test --locked --release --workspace --all-features --no-run | ||
cargo test --locked --release --workspace --all-features --verbose -- --test-threads 1 --nocapture | ||
cargo nextest run --locked --release --workspace --all-features --no-run | ||
timeout-minutes: 90 | ||
|
||
- name: Test | ||
env: | ||
CARGO_TERM_COLOR: always | ||
# 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 nextest run --locked --release --workspace --all-features --retries 2 --verbose -E '!test(slow_)' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it would be nice to add just recipies to mirror the new test commands locally since it's also nice to run the tests quickly locally. And sometimes we want to re-run the same tests as in a CI job locally. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
timeout-minutes: 5 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -197,6 +197,7 @@ | |
cargo-audit | ||
cargo-edit | ||
cargo-sort | ||
cargo-nextest | ||
typos | ||
just | ||
fenix.packages.${system}.rust-analyzer | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.