From 735524691b8f75114603bf9facd910d2c2b8bd8e Mon Sep 17 00:00:00 2001 From: Rune Soerensen Date: Thu, 22 Feb 2024 23:37:01 -0500 Subject: [PATCH] Add GHA lint job --- .github/workflows/ci.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..c15762b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,29 @@ +name: CI + +on: + push: + # Avoid duplicate builds on PRs. + branches: + - main + pull_request: + +permissions: + contents: read + +env: + CARGO_TERM_COLOR: always + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Update Rust toolchain + run: rustup update + - name: Rust Cache + uses: Swatinem/rust-cache@v2.7.3 + - name: Clippy + run: cargo clippy --all-targets --locked -- --deny warnings + - name: rustfmt + run: cargo fmt -- --check