name: ci
on:
push:
branches:
- master
paths-ignore:
- '**/README.md'
jobs:
check:
name: check
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- nightly
- 1.51.0
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Run check
uses: actions-rs/cargo@v1
with:
command: check
test:
name: test
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- nightly
- 1.51.0
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Run check
uses: actions-rs/cargo@v1
with:
command: test
clippy:
name: clippy
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
- nightly
- 1.51.0
steps:
- name: Checkout repository
uses: actions/checkout@v1
- name: Install clippy
run: rustup component add clippy
- name: Run clippy
uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
fmt:
name: fmt
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Install rustfmt
run: rustup component add rustfmt
- name: Check formatting
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
docs:
name: docs
runs-on: ubuntu-latest
strategy:
matrix:
rust:
- stable
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: ${{ matrix.rust }}
override: true
- name: Check doc
uses: actions-rs/cargo@v1
with:
command: doc
args: --no-deps --document-private-items --workspace