Update Instruction
structure
#23
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: Rust | |
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
env: | |
CARGO_INCREMENTAL: 0 | |
jobs: | |
rust: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@v1 | |
with: | |
toolchain: stable #(Rustup toolchain specifier e.g. stable, nightly, 1.42.0, nightly-2022-01-01. ) | |
#target: (Comma-separated string of additional targets to install e.g. wasm32-unknown-unknown) | |
components: clippy, rustfmt | |
- name: cache dependencies | |
uses: Swatinem/rust-cache@v2.4.0 | |
- name: reviewdog / clippy | |
uses: sksat/action-clippy@v0.2.1 | |
with: | |
reporter: github-pr-review | |
clippy_flags: --all-features | |
- name: format check | |
run: cargo fmt --all -- --check | |
- name: unit test | |
run: cargo test | |