From 02bc2361dd6675c2fb4739148ce3c4cf7dee4c32 Mon Sep 17 00:00:00 2001 From: porkbrain Date: Fri, 5 Jul 2024 16:12:12 +0200 Subject: [PATCH] CI runs more checks --- .github/workflows/rust.yml | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 31000a2..206d5cb 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -2,21 +2,31 @@ name: Rust on: push: - branches: [ "main" ] + branches: ["main"] pull_request: - branches: [ "main" ] + branches: ["main"] env: CARGO_TERM_COLOR: always jobs: build: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --verbose + - uses: actions/checkout@v4 + + - name: Install dependencies + run: sudo apt-get update; sudo apt-get install --no-install-recommends libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev + - name: Version check + run: rustc --version && cargo --version && rustfmt --version && cargo clippy --version + - name: Format + run: cargo fmt -- --check + - name: Check + run: cargo check + - name: Clippy + run: cargo clippy -- -D warnings + - name: Test + run: cargo test + - name: Broken docs + run: RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --offline