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