Skip to content

Bump actions/checkout from 3 to 4 #123

Bump actions/checkout from 3 to 4

Bump actions/checkout from 3 to 4 #123

Workflow file for this run

name: Test
on:
- push
- pull_request
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v3.3.1
timeout-minutes: 1
continue-on-error: true
with:
path: |
~/.cargo
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: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache
uses: actions/cache@v3.3.1
timeout-minutes: 1
continue-on-error: true
with:
path: |
~/.cargo
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.0.6
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: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1.0.6
with:
profile: minimal
components: rustfmt
override: 'true'
default: 'true'
- name: Check code formatting
run: cargo fmt -- --check