ci: enable caching

This commit is contained in:
Felix Spöttel 2023-10-21 21:14:32 +02:00
parent 70dac9329f
commit 98408e579d

View file

@ -6,33 +6,29 @@ env:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
jobs: jobs:
check:
runs-on: ubuntu-latest
name: Check
steps:
- uses: actions/checkout@v3
- name: cargo check
run: cargo check
test: test:
runs-on: ubuntu-latest runs-on: ubuntu-latest
name: Test name: Lint & test
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: Set up cargo cache
uses: actions/cache@v3
continue-on-error: false
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: ${{ runner.os }}-cargo-
- name: cargo test - name: cargo test
run: cargo test run: cargo test
# uncomment to enable clippy lints
# clippy: # uncomment to enable clippy linter
# runs-on: ubuntu-latest - name: cargo clippy
# name: Lint (clippy) run: cargo clippy -- -D warnings
# steps: # uncomment to enable format linter
# - uses: actions/checkout@v3 - name: cargo fmt
# - name: cargo clippy run: cargo fmt --check
# run: cargo clippy -- -D warnings
# uncoment to enable format checking
# fmt:
# runs-on: ubuntu-latest
# name: Format
# steps:
# - uses: actions/checkout@v3
# - name: cargo fmt
# run: cargo fmt --check