name: Run tests.
on: [push]
jobs:
build_and_test:
name: Build and test lib
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- run: rustup component add clippy
- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check
- name: Check code
uses: actions-rs/cargo@v1
with:
command: check
args: --all-features
- name: Run clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features -- -Dwarnings -Drust-2018-idioms
- name: Build release
uses: actions-rs/cargo@v1
with:
command: build
args: --release --all-features