Add peek #32
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
pull_request: | |
branches: | |
- master | |
push: | |
branches: | |
- master | |
env: | |
RUSTFLAGS: -D warnings | |
RUST_BACKTRACE: 1 | |
jobs: | |
test: | |
name: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Rust | |
run: | | |
rustup update --no-self-update stable | |
rustup default stable | |
- name: Get Rust version | |
id: rust-version | |
run: echo "::set-output name=version:$(rustc --version)" | |
- name: Index cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cargo/registry/index | |
key: index-${{ github.run_id }} | |
restore-keys: | | |
index- | |
- name: Create lockfile | |
run: cargo generate-lockfile | |
- name: Registry cache | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cargo/registry/cache | |
key: registry-${{ hashFiles('Cargo.lock') }} | |
- name: Fetch dependencies | |
run: cargo fetch | |
- name: Target cache | |
uses: actions/cache@v3 | |
with: | |
path: target | |
key: target-${{ steps.rust-version.outputs.version }}-${{ hashFiles('Cargo.lock') }} | |
- name: Test | |
run: cargo test |