Skip to content

Commit

Permalink
Update lint.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
ChillFish8 authored Nov 20, 2021
1 parent 5678eaa commit 822d8b7
Showing 1 changed file with 31 additions and 19 deletions.
50 changes: 31 additions & 19 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,44 @@
name: Rust
name: Lint

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

env:
CARGO_TERM_COLOR: always
types: [ opened, synchronize, reopened ]

jobs:
build:

fmt:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Install latest nightly

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rustfmt, clippy

- uses: actions/checkout@v2
- name: Run Lint
run: cargo +nightly fmt -- --check

toolchain: nightly
profile: minimal
components: rustfmt
override: true
- name: Rustfmt Check
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Run Clippy
run: cargo clippy -- -D warnings

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
components: clippy
override: true
- name: Clippy Check
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --workspace --all-features --tests --examples --bins -- -Dclippy::todo

0 comments on commit 822d8b7

Please sign in to comment.