name: CI
on:
push:
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
clippy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.59.0
override: true
components: clippy
- name: clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: --verbose --all-targets -- -D warnings
rustfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.59.0
override: true
components: rustfmt
- name: clippy
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
build-and-test:
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- 1.56.0
- stable
- beta
- nightly
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: build
uses: actions-rs/cargo@v1
with:
command: build
args: --verbose --all-targets
- name: test
uses: actions-rs/cargo@v1
with:
command: test
args: --verbose
- name: doc
uses: actions-rs/cargo@v1
with:
command: doc
args: --verbose