From f831ad6c7a3c8c4cb3f4efc22deb8ccfc25f48c2 Mon Sep 17 00:00:00 2001 From: Valerio Ageno Date: Mon, 24 Jun 2024 17:37:18 +0200 Subject: [PATCH] feat: add lint and fmt checks on rust pipelines --- .github/workflows/rust.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 31c1509e..b937da92 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -14,6 +14,15 @@ env: CARGO_TERM_COLOR: always jobs: + lint_and_fmt: + if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - run: cargo fmt --all -- --check + - run: cargo clippy -- -D warnings + build_and_test: if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name name: Build and test rust crates