From cefcaec0ceb322e021caea2155c38426811aae2d Mon Sep 17 00:00:00 2001 From: A Farzat Date: Mon, 9 Mar 2026 08:07:33 +0300 Subject: Add simple GitHub workflow job checking fmt & lint --- .github/workflows/ci.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 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..a8978fd --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,33 @@ +name: CI + +on: + push: + branches: + - master + pull_request: + +jobs: + check: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + + - name: Cache cargo + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: rust-${{ hashFiles('Cargo.lock') }} + + - name: Run rustfmt + run: cargo fmt --all -- --check + + - name: Run clippy + run: cargo clippy --all-targets --all-features -- -D warnings -- cgit v1.2.3-70-g09d2