Skip to content

Commit

Permalink
ci: run unit tests in separate processes (#1559)
Browse files Browse the repository at this point in the history
  • Loading branch information
yangby-cryptape authored Nov 15, 2023
1 parent 5072b57 commit 131fa21
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,17 @@ jobs:
target/
key: ${{ matrix.os }}-${{ runner.os }}-${{ runner.arch }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}

- uses: taiki-e/install-action@nextest
- name: Run Rust unit-test
run: |
make test
make test-in-separate-processes
du -hd1 target/debug/
echo "reduce the cargo cache size"
rm -rf target/debug/examples
rm -rf target/debug/incremental
du -hd1 target/debug/
ls -l ~/.cargo/bin/
rm -f ~/.cargo/bin/cargo-nextest
other-unit-test:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ CARGO := cargo
test:
${CARGO} test ${VERBOSE} --all -- --nocapture

# Since Axon uses global variables, run all tests in one process may cause unexpected errors.
test-in-separate-processes:
cargo nextest run --workspace --no-fail-fast --hide-progress-bar --failure-output final

doc:
cargo doc --all --no-deps

Expand Down

0 comments on commit 131fa21

Please sign in to comment.