diff options
Diffstat (limited to '.github/workflows/linting.yml')
| -rw-r--r-- | .github/workflows/linting.yml | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml new file mode 100644 index 0000000..685b93a --- /dev/null +++ b/.github/workflows/linting.yml @@ -0,0 +1,33 @@ +name: Linting +on: [push, pull_request] + +jobs: + dependency-lint: + name: Dependency linting + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: EmbarkStudios/cargo-deny-action@v1 + with: + arguments: --all-features + command-arguments: --allow license-not-encountered + code-lint: + name: Code linting + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: dtolnay/rust-toolchain@stable + with: + toolchain: nightly + components: clippy, rust-src + - run: cargo clippy --all-features -- --deny warnings + code-format: + name: Check formatting + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: dtolnay/rust-toolchain@stable + with: + toolchain: nightly + components: rustfmt, rust-src + - run: cargo fmt -- --check |
