Add linting

This commit is contained in:
Andras Schmelczer 2024-12-18 21:28:43 +00:00
commit 7c616b3055
No known key found for this signature in database
GPG key ID: FC8F2C3D3D1A718C

View file

@ -2,21 +2,29 @@ name: Rust
on: on:
push: push:
branches: [ "master" ] branches: ["master"]
pull_request: pull_request:
branches: [ "master" ] branches: ["master"]
env: env:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
RUSTFLAGS: "-Dwarnings"
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Build
run: cargo build --verbose - name: Lint
- name: Run tests run: |
run: cargo test --verbose 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