✨ Create @snapshots
subvolume if it does not exist.
#57
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 Checks | |
env: | |
CARGO_TERM_COLOR: always | |
on: | |
pull_request: | |
paths: | |
- "**.rs" | |
- ".github/workflows/rust.yml" | |
push: | |
paths: | |
- "**.rs" | |
- ".github/workflows/rust.yml" | |
jobs: | |
rustfmt: | |
name: Check Rust Formatting | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install stable Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: 1.60 | |
components: rustfmt, clippy | |
- name: Cache build | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/ | |
target/ | |
key: ${{ runner.os }}-v1-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- name: Check with rustfmt | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --check | |
- name: Check with clippy | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --no-deps | |
cargo-deny: | |
name: Check with cargo-deny (${{ matrix.checks }}) | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
checks: | |
- advisories | |
- bans licenses sources | |
continue-on-error: ${{ matrix.checks == 'advisories' }} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Cache cargo-deny | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/ | |
key: ${{ runner.os }}-v1-cargo-deny | |
- name: Install stable Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
- name: Install cargo-deny | |
uses: actions-rs/cargo@v1 | |
with: | |
command: install | |
args: cargo-deny | |
- name: Check with cargo-deny | |
uses: actions-rs/cargo@v1 | |
with: | |
command: deny | |
args: check ${{ matrix.checks }} |