Update check.yml #4
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: check | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
fmt: | |
permissions: read-all | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- uses: actions/cache@v4 | |
if: ${{ ! startsWith(runner.name,'dtz-') }} | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
~/.rustup | |
/usr/local/cargo | |
target/ | |
key: ${{ runner.os }}-fmt-${{ hashFiles('**/Cargo.lock') }} | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
components: rustfmt | |
- name: Rustfmt Check | |
uses: actions-rust-lang/rustfmt@v1 | |
with: | |
manifest-path: dtz/Cargo.toml | |
msrv: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: 'true' | |
- uses: actions/cache@v4 | |
if: ${{ ! startsWith(runner.name,'dtz-') }} | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
~/.rustup | |
/usr/local/cargo | |
target/ | |
key: ${{ runner.os }}-clippy-${{ hashFiles('**/Cargo.lock') }} | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
- name: install msrv | |
run: cargo install cargo-msrv | |
- name: Run clippy | |
run: cargo msrv verify --path dtz |