diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index cc042e1..c03a557 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -11,12 +11,32 @@ env: jobs: build: - runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --all --verbose + - name: Check out 🚚 + uses: actions/checkout@v3 + + - name: Install latest stable Rust toolchain 🦀 + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: stable + override: true + default: true + - 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: Build 🔨 + run: cargo build --verbose + - name: Run tests 🚀 + run: cargo test --all --verbose