#!/usr/bin/env bash

set -euo pipefail

cargo test --all-features
cargo doc --all-features

if [[ -v CI ]]; then
    cargo fmt --check
    cargo clippy --all-features -- -Dwarnings -Dclippy::todo
else
    cargo fmt
    cargo clippy --all-features
fi

cargo hack check --feature-powerset --no-dev-deps
