Skip to content

Commit

Permalink
[ci] use cargo nextest instead cargo test in test-linux-stable (parit…
Browse files Browse the repository at this point in the history
…ytech#11576)

* [DO NOT MERGE] Experimenting with nextest

* enable jobs

* enable stages

* add comment

* create test-frame-support job
  • Loading branch information
alvicsam authored and godcodehunter committed Jun 22, 2022
1 parent e67e2f5 commit 50b6aed
Showing 1 changed file with 47 additions and 1 deletion.
48 changes: 47 additions & 1 deletion scripts/ci/gitlab/pipeline/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,58 @@ test-linux-stable:
RUN_UI_TESTS: 1
script:
- rusty-cachier snapshot create
# TODO: add to paritytech/ci-linux image
- time cargo install cargo-nextest
# this job runs all tests in former runtime-benchmarks, frame-staking and wasmtime tests
- time cargo test --workspace --locked --release --verbose --features runtime-benchmarks --manifest-path ./bin/node/cli/Cargo.toml
# node-cli is excluded until https://github.com/paritytech/substrate/issues/11321 fixed
- time cargo nextest run --workspace --locked --release --verbose --features runtime-benchmarks --manifest-path ./bin/node/cli/Cargo.toml --exclude node-cli
- rusty-cachier cache upload

test-frame-support:
stage: test
extends:
- .docker-env
- .test-refs
variables:
# Enable debug assertions since we are running optimized builds for testing
# but still want to have debug assertions.
RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings"
RUST_BACKTRACE: 1
WASM_BUILD_NO_COLOR: 1
WASM_BUILD_RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings"
# Ensure we run the UI tests.
RUN_UI_TESTS: 1
script:
- rusty-cachier snapshot create
- time cargo test -p frame-support-test --features=conditional-storage,no-metadata-docs --manifest-path ./frame/support/test/Cargo.toml --test pallet # does not reuse cache 1 min 44 sec
- SUBSTRATE_TEST_TIMEOUT=1 time cargo test -p substrate-test-utils --release --verbose --locked -- --ignored timeout
- rusty-cachier cache upload

# This job runs tests that don't work with cargo-nextest in test-linux-stable
test-linux-stable-extra:
stage: test
extends:
- .docker-env
- .test-refs
variables:
# Enable debug assertions since we are running optimized builds for testing
# but still want to have debug assertions.
RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings"
RUST_BACKTRACE: 1
WASM_BUILD_NO_COLOR: 1
WASM_BUILD_RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings"
# Ensure we run the UI tests.
RUN_UI_TESTS: 1
script:
- rusty-cachier snapshot create
# Run node-cli tests
# TODO: add to test-linux-stable-nextest after fix https://github.com/paritytech/substrate/issues/11321
- time cargo test node-cli --workspace --locked --release --verbose --features runtime-benchmarks --manifest-path ./bin/node/cli/Cargo.toml
# Run doctests
# TODO: add to test-linux-stable-nextest after fix https://github.com/nextest-rs/nextest/issues/16
- time cargo test --doc --workspace --locked --release --verbose --features runtime-benchmarks --manifest-path ./bin/node/cli/Cargo.toml
- rusty-cachier cache upload

test-frame-examples-compile-to-wasm:
# into one job
stage: test
Expand Down

0 comments on commit 50b6aed

Please sign in to comment.