Skip to content

ci(lint): update workflows of toolchain and clippy #8

ci(lint): update workflows of toolchain and clippy

ci(lint): update workflows of toolchain and clippy #8

Workflow file for this run

name: Cargo Lint
on:
push:
workflow_dispatch:
jobs:
cargo-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install latest stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: deal with rust cache
uses: Swatinem/rust-cache@v1
- name: cargo check
run: cargo check --all-targets --all-features --workspace
cargo-build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install latest stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
- name: deal with rust cache
uses: Swatinem/rust-cache@v1
- name: cargo build
run: cargo build --all-features
cargo-clippy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install latest stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: clippy
- name: deal with rust cache
uses: Swatinem/rust-cache@v1
- run: cargo clippy --workspace --all-features --tests -- -Dwarnings
# temporarily change to a self-maintained workflow
# see https://github.com/actions-rs/clippy-check/pull/158
# - name: cargo clippy
# uses: BobAnkh/clippy-check@master
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# args: --all-targets --all-features --workspace --no-deps
cargo-fmt:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install latest stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt
- name: deal with rust cache
uses: Swatinem/rust-cache@v1
- name: cargo fmt
run: cargo fmt --all -- --check