set -euo pipefail
step() {
echo
echo "==> $1"
}
step "Formatting"
cargo fmt --all -- --check
cargo fmt --all --manifest-path examples/Cargo.toml -- --check
step "Formatting (unstable)"
if cargo +nightly --version >/dev/null 2>&1 ; then
cargo +nightly fmt --all -- --check --config-path .rustfmt.unstable.toml
cargo +nightly fmt --all --manifest-path examples/Cargo.toml -- \
--check --config-path .rustfmt.unstable.toml
else
echo "skipped: no nightly toolchain (rustup toolchain install nightly)"
fi
step "TOML formatting"
taplo fmt --check
step "Clippy"
./admin/clippy -- --deny warnings
step "Tests"
for backend in aws_lc ring rust_crypto ; do
cargo test --package app-store-server-library \
--no-default-features --features $backend,api-client-reqwest,receipt-utility --all-targets
done
step "Doctests"
cargo test --package app-store-server-library \
--no-default-features --features aws_lc,api-client-reqwest,receipt-utility --doc
step "Advisories and licenses"
cargo deny --workspace --all-features check
step "Spelling"
typos --config .github/typos.toml
echo
echo "All checks passed."