name: CI
on:
push:
branches: [ main ]
tags: [ 'v*' ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: FranzDiebold/github-env-vars-action@v1.2.1
- name: Configure toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
- name: Configure target cache
uses: actions/cache@v1
with:
key: cache-${{ hashFiles('**/Cargo.toml') }}
path: |
${{ env.HOME }}/.cargo"
./target
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
- name: Check no-std compile
uses: actions-rs/cargo@v1
with:
command: build
args: --no-default-features