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