Skip to content

Commit

Permalink
Add clippy and fmt to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
antimora authored Sep 22, 2023
1 parent 2f980b5 commit 972404b
Showing 1 changed file with 33 additions and 12 deletions.
45 changes: 33 additions & 12 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,46 @@ name: Rust

on:
push:
branches: [ "main" ]
branches: ["main"]
pull_request:
branches: [ "main" ]
branches: ["main"]

env:
CARGO_TERM_COLOR: always

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
rust: [stable, 1.71.0]

steps:
- uses: actions/checkout@v3
- name: Build
run: |
cd squeezenet-burn
cargo build --verbose
- name: Run tests
run: |
cd squeezenet-burn
cargo test --verbose
- uses: actions/checkout@v4

- name: install rust
uses: dtolnay/rust-toolchain@master
with:
components: rustfmt, clippy
toolchain: ${{ matrix.rust }}

- name: Check Formatting
run: |
cd squeezenet-burn
cargo fmt --all -- --check
- name: Run Clippy
run: |
cd squeezenet-burn
cargo clippy --all-targets --all-features -- -D warnings
- name: Build
run: |
cd squeezenet-burn
cargo build --verbose
- name: Run tests
run: |
cd squeezenet-burn
cargo test --verbose

0 comments on commit 972404b

Please sign in to comment.