on: [push, pull_request]
jobs:
check:
name: check
runs-on: ubuntu-latest
steps:
- name: checkout source
uses: actions/checkout@v2
- name: install nightly toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- name: cargo check
uses: actions-rs/cargo@v1
with:
command: check
test:
name: test
runs-on: ubuntu-latest
steps:
- name: checkout source
uses: actions/checkout@v2
- name: install nightly toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- name: cargo test
uses: actions-rs/cargo@v1
with:
command: test
lint:
name: lint
runs-on: ubuntu-latest
steps:
- name: checkout source
uses: actions/checkout@v2
- name: install nightly toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt, clippy
- name: cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- name: cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings