Skip to content

Use cargo nextest to speed up the testing workflow #111

Use cargo nextest to speed up the testing workflow

Use cargo nextest to speed up the testing workflow #111

Workflow file for this run

name: Rust CI
on:
push:
branches:
- ci-use-cargo-nextest-to-speed-up-the-testing-workflow
pull_request:
branches:
- main
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: Build and Test
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name : Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.cargo/bin
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
${{ runner.os }}-cargo
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Install Nextest test runner
uses: taiki-e/install-action@nextest
- name: Install system dependencies
run: sudo apt update && sudo apt install -y libssl-dev pkg-config
- name: Build and Run Test
run: |
cargo build --workspace --all-features
cargo nextest run --workspace --all-features