name: Continuous integration
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
check:
runs-on: ubuntu-latest
name: Check
steps:
- uses: actions/checkout@v2
- name: Install minimal rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
test:
runs-on: ubuntu-latest
name: Test Suite
steps:
- uses: actions/checkout@v2
- name: Install minimal rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
fmt:
runs-on: ubuntu-latest
name: Rustfmt
steps:
- uses: actions/checkout@v2
- name: Install minimal rust with rustfmt
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt
- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: -- --check