Skip to content

Add check for dirty work dir to catch missing changes to Cargo.lock. #431

Add check for dirty work dir to catch missing changes to Cargo.lock.

Add check for dirty work dir to catch missing changes to Cargo.lock. #431

Workflow file for this run

name: test suite
on: [push, pull_request]
jobs:
clippy:
name: cargo clippy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
with:
components: clippy
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/customizing-github-hosted-runners#installing-software-on-ubuntu-runners
# is explicit that we must run `apt-get update` before trying to install packages
- run: sudo apt-get update
- run: sudo apt-get install -y pkg-config libudev-dev
- run: cargo clippy -- --deny warnings
build:
name: workspace build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- run: sudo apt-get update
- run: sudo apt-get install -y pkg-config libudev-dev
- run: cargo build --locked --workspace
- run: git diff HEAD --exit-code
test:
name: cargo test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- run: sudo apt-get update
- run: sudo apt-get install -y pkg-config libudev-dev
- run: cargo test --all-features