Skip to content

Add CI and pre-hook script #2

Add CI and pre-hook script

Add CI and pre-hook script #2

Workflow file for this run

name: Continous Integration
on:
push:
branches: [master]
pull_request:
branches: [master]
env:
CARGO_TERM_COLORS: always
jobs:
clippy_fmt_docs_check:
name: Check clippy lints, formatting and docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy,rustfmt
- name: Check formatting
run: cargo fmt --all -- --check
- name: Install alsa and udev
run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev
- name: Check with all features enabled
run: cargo clippy --all-features -- --deny clippy::all -D warnings
- name: Check without any feature
run: cargo clippy --no-default-features -- --deny clippy::all -D warnings
- name: Verify that docs compile
run: RUSTDOCFLAGS="-D warnings" cargo doc --no-deps
- name: Run tests
run: cargo test