Update the book #18
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: CI | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
jobs: | |
fmt: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: rustup update && rustup component add rustfmt | |
- run: cargo fmt -- --check | |
clippy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: rustup update && rustup component add clippy | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo clippy --all-targets -- -D warnings -D clippy::all | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: rustup update | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo test | |
env: | |
RUST_BACKTRACE: 1 | |
deny: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- run: rustup update | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo install cargo-deny || true | |
- run: cargo deny check | |
typos: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: Swatinem/rust-cache@v2 | |
- run: cargo install typos-cli || true | |
- run: typos |