Skip to content

Commit

Permalink
ci: reenable tests
Browse files Browse the repository at this point in the history
  • Loading branch information
0xdeafbeef committed Jul 15, 2024
1 parent 2e74639 commit e6ed274
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 25 deletions.
2 changes: 2 additions & 0 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[profile.default]
slow-timeout = { period = "30s", terminate-after = 1 }
46 changes: 24 additions & 22 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,32 @@ on:
pull_request:
branches:
- master
env:
CARGO_TERM_COLOR: always

jobs:

# test:
# name: Test Suite
# runs-on: ubuntu-latest
# needs: clippy
# steps:
# - name: Checkout repository
# uses: actions/checkout@v3
# - name: Install Clang
# run: sudo apt-get update && sudo apt-get install -y clang
# - name: Install Rust toolchain
# uses: actions-rs/toolchain@v1
# with:
# toolchain: stable
# profile: minimal
# override: true
# - uses: Swatinem/rust-cache@v2
# - uses: actions-rs/cargo@v1
# with:
# command: test
# args: --all-features --workspace

test:
name: Test Suite
runs-on: ubuntu-latest
needs: rustfmt
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install Clang
run: sudo apt-get update && sudo apt-get install -y clang
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Install latest nextest release
uses: taiki-e/install-action@nextest
- name: Test with latest nextest release
uses: actions-rs/cargo@v1
with:
command: nextest
args: run # --all-features add after it builds successfully
rustfmt:
name: Rustfmt
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion collator/src/mempool/impls/stub_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ impl MempoolAdapterStubImpl {
tracing::info!(target: tracing_targets::MEMPOOL_ADAPTER, "finished");
}

for anchor_id in 1.. {
for anchor_id in 1..100 {
tokio::time::sleep(make_round_interval() * 5).await;

let anchor = make_stub_anchor(anchor_id);
Expand Down
1 change: 1 addition & 0 deletions collator/tests/validator_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ fn make_network(node_count: usize) -> Vec<Node> {
}

#[tokio::test]
#[ignore]
async fn test_validator_accept_block_by_state() -> anyhow::Result<()> {
let global_validated_blocks = Arc::new(AtomicUsize::new(0));

Expand Down
7 changes: 5 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ default:
install_fmt:
rustup component add rustfmt --toolchain nightly

install_nextest:
cargo install cargo-nextest --locked

install_lychee:
cargo install lychee

Expand Down Expand Up @@ -63,8 +66,8 @@ docs:
export RUSTDOCFLAGS=-D warnings
cargo doc --no-deps --document-private-items --all-features --workspace

test:
cargo test --all-targets --all-features --workspace
test: install_nextest
cargo nextest r

# runs all tests including ignored. Will take a lot of time to run
integration_test: prepare_integration_tests
Expand Down

0 comments on commit e6ed274

Please sign in to comment.