Skip to content

Commit

Permalink
ci: add lint workflow (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
afonsojramos authored Feb 7, 2022
1 parent 26e4ac8 commit 43263cc
Showing 1 changed file with 49 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Lint

on: [push, pull_request]

jobs:
clippy:
name: Clippy
runs-on: ubuntu-latest

steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install stable toolchain
id: toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: clippy
profile: minimal
override: true

- name: Cache
uses: Swatinem/rust-cache@v1

- name: Run clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: -- -D clippy::all

rustfmt:
name: Format
runs-on: ubuntu-latest

steps:
- name: Checkout sources
uses: actions/checkout@v2

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: stable
components: rustfmt
profile: minimal
override: true

- name: Run cargo fmt
run: cargo fmt --all -- --check

0 comments on commit 43263cc

Please sign in to comment.