name: CI
on:
pull_request:
push:
branches: ["*"]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
rust_version: [stable, "1.34.0"]
steps:
- uses: actions/checkout@v1
- name: Set up Rust toolchain
run: |
rustup default ${{ matrix.rust_version }}
rustup component add clippy rustfmt
- name: Build and test (default features)
run: |
cargo build --verbose
cargo test --verbose
- name: Build and test (all features)
run: |
cargo build --verbose --all-features
cargo test --verbose --all-features
- name: Build and test (no features)
run: |
cargo build --verbose --no-default-features
cargo test --verbose --no-default-features
- name: Rustfmt and Clippy
run: |
cargo fmt -- --check
cargo clippy -- -D warnings
if: matrix.rust_version == 'stable'