Skip to content

Fix formatting

Fix formatting #16

Workflow file for this run

name: CI
on: [push, pull_request]
env:
minrust: 1.56.0
jobs:
test:
name: Test
runs-on: ${{ matrix.os || 'ubuntu-latest' }}
strategy:
fail-fast: false
matrix:
name:
- stable
- beta
- nightly
- macOS
- Windows
include:
- name: beta
toolchain: beta
- name: nightly
toolchain: nightly
- name: macOS
os: macOS-latest
- name: Windows
os: windows-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install toolchain
id: tc
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.toolchain || 'stable' }}
profile: minimal
override: true
- name: Setup cache
if: runner.os != 'macOS'
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-test-${{ steps.tc.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.toml') }}
- name: Build all features
if: matrix.features == ''
run: cargo build --all-features
- name: Test all features
if: matrix.features == ''
run: cargo test --all-features
clippy:
name: Run clippy
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install toolchain
id: tc
uses: actions-rs/toolchain@v1
with:
toolchain: stable
profile: minimal
override: true
- name: Setup cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-clippy-${{ steps.tc.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.toml') }}
- run: cargo clippy
MSRV:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install toolchain (${{ env.minrust }})
id: tc
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.minrust }}
profile: minimal
override: true
- name: Setup cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-msrv-${{ steps.tc.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.toml') }}
- run: cargo check --all-features
doc:
name: Build docs
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
- name: Install toolchain
id: tc
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
profile: minimal
override: true
- name: Setup cache
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-docs-${{ steps.tc.outputs.rustc_hash }}-${{ hashFiles('**/Cargo.toml') }}
- name: Build docs
run: |
cargo doc