name: Rust
on:
push:
branches:
pull_request:
branches:
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache cargo build dir
uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-target
- name: Build
run: cargo build --all-targets
- name: Run tests
run: cargo test --all