on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
name: Rust CI CD
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt, clippy
- name: Build
run: cargo build --verbose
- name: Test
run: cargo test --verbose
- name: Bench
run: cargo bench --verbose
- name: Format
run: cargo fmt --check --verbose
- name: Clippy
run: cargo clippy --verbose
- name: Documentation
run: cargo doc --verbose