Skip to content

Commit

Permalink
use nextest
Browse files Browse the repository at this point in the history
  • Loading branch information
zqhxuyuan committed Jul 21, 2022
1 parent 6334e0f commit 9ecb80e
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 12 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ jobs:
components: rustfmt
target: wasm32-unknown-unknown
default: true
- name: Install cargo-nextest
uses: baptiste0928/cargo-install@v1
with:
crate: cargo-nextest
locked: true
- name: Run benchmarking tests
run: make test-benchmarking
checks-and-tests:
Expand All @@ -94,6 +99,11 @@ jobs:
components: rustfmt
target: wasm32-unknown-unknown
default: true
- name: Install cargo-nextest
uses: baptiste0928/cargo-install@v1
with:
crate: cargo-nextest
locked: true
- name: Run runtime tests
run: make test-runtimes
- name: Run eth tests
Expand Down
24 changes: 12 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -126,37 +126,37 @@ try-runtime-acala:

.PHONY: test
test: githooks
SKIP_WASM_BUILD= cargo test --features with-mandala-runtime --all
SKIP_WASM_BUILD= cargo nextest run --features with-mandala-runtime --all

.PHONY: test-eth
test-eth: githooks test-evm
SKIP_WASM_BUILD= cargo test -p runtime-common --features with-ethereum-compatibility schedule_call_precompile_should_work
SKIP_WASM_BUILD= cargo test -p runtime-integration-tests --features with-mandala-runtime --features with-ethereum-compatibility should_not_kill_contract_on_transfer_all
SKIP_WASM_BUILD= cargo test -p runtime-integration-tests --features with-mandala-runtime --features with-ethereum-compatibility schedule_call_precompile_should_handle_invalid_input
SKIP_WASM_BUILD= cargo nextest run -p runtime-common --features with-ethereum-compatibility schedule_call_precompile_should_work
SKIP_WASM_BUILD= cargo nextest run -p runtime-integration-tests --features with-mandala-runtime --features with-ethereum-compatibility should_not_kill_contract_on_transfer_all
SKIP_WASM_BUILD= cargo nextest run -p runtime-integration-tests --features with-mandala-runtime --features with-ethereum-compatibility schedule_call_precompile_should_handle_invalid_input

.PHONY: test-evm
test-evm: githooks
SKIP_WASM_BUILD= cargo test --manifest-path evm-tests/jsontests/Cargo.toml
SKIP_WASM_BUILD= cargo nextest run --manifest-path evm-tests/jsontests/Cargo.toml

.PHONY: test-runtimes
test-runtimes:
SKIP_WASM_BUILD= cargo test --all --features with-all-runtime
SKIP_WASM_BUILD= cargo test -p runtime-integration-tests --features=with-mandala-runtime
SKIP_WASM_BUILD= cargo test -p runtime-integration-tests --features=with-karura-runtime
SKIP_WASM_BUILD= cargo test -p runtime-integration-tests --features=with-acala-runtime
SKIP_WASM_BUILD= cargo nextest run --all --features with-all-runtime
SKIP_WASM_BUILD= cargo nextest run -p runtime-integration-tests --features=with-mandala-runtime
SKIP_WASM_BUILD= cargo nextest run -p runtime-integration-tests --features=with-karura-runtime
SKIP_WASM_BUILD= cargo nextest run -p runtime-integration-tests --features=with-acala-runtime

.PHONY: test-e2e
test-e2e:
cargo test --release --package test-service -- --include-ignored --skip test_full_node_catching_up --skip simple_balances_test
cargo nextest run --release --package test-service -- --include-ignored --skip test_full_node_catching_up --skip simple_balances_test

.PHONY: test-ts
test-ts: build-mandala-internal-release
cd ts-tests && yarn && yarn run build && ACALA_BUILD=release yarn run test

.PHONY: test-benchmarking
test-benchmarking:
cargo test --features bench --package module-evm --package runtime-common
cargo test --features runtime-benchmarks --features with-all-runtime --features --all benchmarking
cargo nextest run --features bench --package module-evm --package runtime-common
cargo nextest run --features runtime-benchmarks --features with-all-runtime --features --all benchmarking

.PHONY: test-all
test-all: test-runtimes test-eth test-benchmarking
Expand Down

0 comments on commit 9ecb80e

Please sign in to comment.