From 7c616b30554c2031dc30a18cc459b38824139712 Mon Sep 17 00:00:00 2001 From: Andras Schmelczer Date: Wed, 18 Dec 2024 21:28:43 +0000 Subject: [PATCH] Add linting --- .github/workflows/rust.yml | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 000bb2c..2c75fe7 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -2,21 +2,29 @@ name: Rust on: push: - branches: [ "master" ] + branches: ["master"] pull_request: - branches: [ "master" ] + branches: ["master"] env: CARGO_TERM_COLOR: always + RUSTFLAGS: "-Dwarnings" jobs: build: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --verbose + - uses: actions/checkout@v4 + + - name: Lint + run: | + cd backend + cargo clippy --all-targets --all --all-features + cargo fmt --all -- --check + + - name: Build + run: cargo build --verbose + + - name: Run tests + run: cargo test --verbose