set -e
echo "### Checking for external types in public API"
cargo "+${RUST_NIGHTLY_VERSION:-nightly}" api-linter --all-features --config api-linter.toml
echo "### Checking for duplicate dependency versions in the normal dependency graph with all features enabled"
cargo tree -d --edges normal --all-features
echo "### Testing with all features enabled"
cargo test --all-features
echo "### Testing each feature in isolation"
cargo hack test --feature-powerset
echo "### Checking that compiling with the minimal versions succeeds"
cargo "+${RUST_NIGHTLY_VERSION:-nightly}" minimal-versions check --all-features