Skip to content

ci: add typos and fix clippy #404

ci: add typos and fix clippy

ci: add typos and fix clippy #404

Workflow file for this run

name: build
on:
- push
- pull_request
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: typos-action
uses: crate-ci/typos@v1.18.0
- name: Install Rust stable
run: |
set -x
rustup toolchain update --no-self-update stable
rustup default stable
rustup component add clippy rustfmt
rustup show
rustc --version | awk '{print $2}' | tee RUSTC_VER
echo "::set-output name=rustc_ver::$(cat RUSTC_VER)"
- name: Cache for Rust
uses: actions/cache@v3
with:
path: |
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
target
key: ${{ github.workflow }}|${{ runner.os }}|cargo|00|${{ steps.prep.outputs.rustc_ver }}|${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ github.workflow }}|${{ runner.os }}|cargo|00|${{ steps.prep.outputs.rustc_ver }}|
- name: Run rustfmt
run: cargo fmt --all --check
- name: Run clippy
run: cargo clippy --workspace --all-targets --all-features -- -Dwarnings
- name: Run tests
run: cargo test --all -- --nocapture
- name: Run build
run: cargo build --all