on:
push:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
id: cache
with:
path: |
target/debug/qastor
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock', 'src/**') }}
- name: Cache dependencies
if: steps.cache.outputs.cache-hit != 'true'
uses: Swatinem/rust-cache@v2
- name: Build
if: steps.cache.outputs.cache-hit != 'true'
run: cargo build
- name: Test
if: steps.cache.outputs.cache-hit != 'true'
run: cargo test