backend documents mirrors examples crates #114
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
name: Lints | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
types: [ opened, edited ] | |
branches: [ main ] | |
paths: | |
- '**.rs' | |
- '**/Cargo.toml' | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install nightly toolchain with rustfmt available | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: nightly | |
components: rustfmt | |
- name: Run cargo fmt | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install nightly toolchain with clippy available | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: nightly | |
components: clippy | |
- name: Run cargo clippy | |
uses: actions-rs/clippy-check@v1 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
args: --all --lib --all-features -- -D warnings |