Skip to content

chore: specify format rules #534

chore: specify format rules

chore: specify format rules #534

Workflow file for this run

name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, macos-latest, ubuntu-latest]
rust: [stable, nightly]
env:
RUST_BACKTRACE: 1
steps:
- uses: actions/checkout@v2
- name: Set up toolchains
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
override: true
components: rustfmt, clippy
- name: Install taplo-cli from crates.io
uses: baptiste0928/cargo-install@v2
with:
crate: taplo-cli
version: "0.7.2"
- name: Check format
if: matrix.rust == 'nightly'
run: cargo fmt --all -- --check
- name: Check Cargo.toml format
if: matrix.rust == 'nightly'
run: taplo fmt --check
- name: Lints
if: matrix.rust == 'nightly'
run: cargo clippy --all-targets --all-features -- --deny warnings
- name: Build
run: cargo build --workspace --all-targets
- name: Run tests
run: |
cargo test --workspace --all-targets -- --nocapture
cargo test --doc
- name: Run benches
run: cargo bench --workspace --bench compare --bench trace
- name: Run examples
run: |
cargo run --example asynchronous
cargo run --example synchronous
cargo run --example get_started