Skip to content

Attempt to add caching to CI #4

Attempt to add caching to CI

Attempt to add caching to CI #4

Workflow file for this run

name: Cargo Build & Test
on:
push:
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

Check failure on line 21 in .github/workflows/cargo.yml

View workflow run for this annotation

GitHub Actions / Cargo Build & Test

Invalid workflow file

The workflow is not valid. .github/workflows/cargo.yml (Line: 21, Col: 9): Unexpected value 'key' .github/workflows/cargo.yml (Line: 36, Col: 9): Unexpected value 'key'
- run: rustup update stable && rustup default stable
- run: cargo build --verbose
test:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: rustup update stable && rustup default stable
- run: cargo test --verbose
clippy:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: rustup update stable && rustup default stable
- run: cargo clippy --verbose