chore: trace flaky tests on ci #62
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Rust CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
build-and-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
components: rustfmt, clippy | |
override: true | |
- name: Cache cargo registry | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cargo/registry | |
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-cargo-registry- | |
- name: Cache cargo index | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cargo/git | |
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-cargo-index- | |
- name: Cache cargo build | |
uses: actions/cache@v2 | |
with: | |
path: target | |
key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-cargo-build- | |
- name: Check no default features | |
run: cargo check --no-default-features | |
- name: Check formatting | |
run: cargo fmt -- --check | |
- name: Lint with Clippy | |
run: cargo clippy --workspace --all-features --bins --tests | |
- name: Build | |
run: cargo build --release --workspace --all-features --verbose | |
- name: Install Nextest | |
run: cargo install cargo-nextest | |
- name: Run tests with Nextest | |
run: RUST_BACKTRACE=1 cargo nextest run --all-features --workspace --verbose | |
- name: Run docs | |
run: cargo doc --workspace --all-features --no-deps --document-private-items --verbose |