2021-02-24 10:48:41 +01:00
|
|
|
name: Lint
|
|
|
|
|
2020-07-22 05:32:13 +02:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
types: [opened, synchronize, reopened]
|
|
|
|
|
|
|
|
jobs:
|
2021-02-24 10:48:41 +01:00
|
|
|
fmt:
|
2020-07-22 05:32:13 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-01-27 21:36:05 +01:00
|
|
|
- uses: actions/checkout@v3
|
2020-07-22 05:32:13 +02:00
|
|
|
|
2021-02-24 10:48:41 +01:00
|
|
|
- name: Install Rust
|
2023-01-27 21:36:05 +01:00
|
|
|
run: |
|
|
|
|
rustup set profile minimal
|
|
|
|
rustup install stable
|
|
|
|
rustup override set stable
|
|
|
|
rustup component add rustfmt
|
2021-02-24 10:48:41 +01:00
|
|
|
- name: Rustfmt Check
|
2023-01-27 21:36:05 +01:00
|
|
|
run: cargo fmt --all -- --check
|
2020-07-22 05:32:13 +02:00
|
|
|
|
2021-02-24 10:48:41 +01:00
|
|
|
clippy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-01-27 21:36:05 +01:00
|
|
|
- uses: actions/checkout@v3
|
2021-02-24 10:48:41 +01:00
|
|
|
|
|
|
|
- name: Install Rust
|
2023-01-27 21:36:05 +01:00
|
|
|
run: |
|
|
|
|
rustup set profile minimal
|
|
|
|
rustup install stable
|
|
|
|
rustup override set stable
|
|
|
|
rustup component add clippy
|
|
|
|
- uses: giraffate/clippy-action@v1
|
2020-07-22 05:32:13 +02:00
|
|
|
with:
|
2023-01-27 21:36:05 +01:00
|
|
|
reporter: "github-pr-check"
|
|
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
clippy_flags: --workspace --all-features --tests --examples --bins -- -Dclippy::todo
|