on:
pull_request:
branches: [ "master" ]
env:
CARGO_TERM_COLOR: always
jobs:
build:
name: Build (${{ matrix.features }})
runs-on: ubuntu-latest
strategy:
matrix:
features: [ "", "rust" ]
steps:
- name: Git Checkout
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt, clippy
- name: Build
run: cargo build --features "${{ matrix.features }}" --verbose
- name: Test
run: cargo test --features "${{ matrix.features }}" --verbose
- name: Format
run: cargo fmt --all -- --check
- name: Lint
run: cargo clippy --all-targets --features "${{ matrix.features }}" -- -D warnings