name: Rust
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
features: [[], ["--all-features"]]
steps:
- uses: actions/checkout@v2
- name: Check Formatting
run: cargo fmt --check
- name: Clippy
run: cargo clippy ${{ join(matrix.features, ' ') }}
- name: Build
run: cargo build --verbose ${{ join(matrix.features, ' ') }}
- name: Run build tests
run: cargo build --tests ${{ join(matrix.features, ' ') }}
- name: Run tests
run: cargo test --tests --verbose ${{ join(matrix.features, ' ') }}
- name: Run doctests
run: cargo test --doc --verbose ${{ join(matrix.features, ' ') }}