chore(deps): bump actions/cache from 3.3.1 to 3.3.2 (#55) #352
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: Test | |
on: | |
- push | |
- pull_request | |
jobs: | |
test: | |
name: Test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
- windows-latest | |
- macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache | |
uses: actions/[email protected] | |
timeout-minutes: 1 | |
continue-on-error: true | |
if: matrix.os != 'macos-latest' # Cache causes errors on macOS | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('rust-toolchain') }}-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ github.job }}-${{ runner.os }}-${{ hashFiles('rust-toolchain') }}-${{ hashFiles('**/Cargo.lock') }} | |
${{ github.job }}-${{ runner.os }}-${{ hashFiles('rust-toolchain') }}- | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
override: 'true' | |
default: 'true' | |
- name: Build | |
run: cargo build --locked | |
- name: Test | |
run: cargo test | |
clippy_check: | |
name: Clippy | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache | |
uses: actions/[email protected] | |
timeout-minutes: 1 | |
continue-on-error: true | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ github.job }}-${{ runner.os }}-${{ hashFiles('rust-toolchain') }}-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ github.job }}-${{ runner.os }}-${{ hashFiles('rust-toolchain') }}-${{ hashFiles('**/Cargo.lock') }} | |
${{ github.job }}-${{ runner.os }}-${{ hashFiles('rust-toolchain') }}- | |
- uses: actions-rs/[email protected] | |
with: | |
profile: minimal | |
components: clippy | |
override: 'true' | |
default: 'true' | |
- name: Use clippy to lint code | |
run: cargo clippy -- -D warnings | |
fmt_check: | |
name: Fmt | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions-rs/[email protected] | |
with: | |
profile: minimal | |
components: rustfmt | |
override: 'true' | |
default: 'true' | |
- name: Check code formatting | |
run: cargo fmt -- --check |