name: test
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Cache Cargo registry
uses: actions/cache@v2
with:
path: ~/.cargo/registry
key: ${{ matrix.build }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ matrix.build }}-cargo-registry-
- name: Cache Cargo index
uses: actions/cache@v2
with:
path: ~/.cargo/git
key: ${{ matrix.build }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ matrix.build }}-cargo-index-
- name: Cache Cargo build
uses: actions/cache@v2
with:
path: target
key: ${{ matrix.build }}-target-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ matrix.build }}-target-
- name: Run tests
run: cargo test --verbose
- name: Run tests with no-std
run: cargo test --verbose --no-default-features