Skip to content

Commit

Permalink
Enable clippy check in Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
yuankunzhang committed Aug 8, 2024
1 parent ee1a79d commit f7a98b2
Showing 1 changed file with 20 additions and 8 deletions.
28 changes: 20 additions & 8 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,33 @@ 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
steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose

linting:
name: Linting and formatting
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt
- name: Rustfmt Check
uses: actions-rust-lang/rustfmt@v1
- uses: actions/checkout@v4
- name: Run Clippy
run: cargo clippy --all-targets --all-features

0 comments on commit f7a98b2

Please sign in to comment.