-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
5678eaa
commit 822d8b7
Showing
1 changed file
with
31 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |