From b2c6c9b8cedd264751d804b54c695cda7c4def1d Mon Sep 17 00:00:00 2001 From: tobinio Date: Sat, 31 Jan 2026 09:51:08 +0100 Subject: [PATCH] ci: add github action for linting bsaed on #44 --- .github/workflows/lint.yml | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/lint.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..369e2ff --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,38 @@ +name: Lint + +on: + push: + branches: ["master"] + pull_request: + workflow_dispatch: + workflow_call: + +env: + CARGO_TERM_COLOR: always + NAME: cargo-features + +jobs: + check-test-build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v6 + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + components: rustfmt, clippy + override: true + - uses: swatinem/rust-cache@v2 + + - name: cargo check + run: cargo check --all-targets --all-features + + - name: cargo fmt + run: cargo fmt --all -- --check + + - name: cargo test + run: cargo test --all-features + + - name: cargo clippy + run: cargo clippy --all-targets --all-features -- -D warnings -- 2.51.2