smithy-rs/tools/ci-scripts/check-aws-sdk-smoketest-doc...

38 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
#
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
#
set -eux
# Docs, clippy, etc on the smoketest itself
pushd aws-sdk-smoketest &>/dev/null
# Override "fail on warning" for smoke test docs since DynamoDB's modeled docs cause rustdoc warnings
RUSTDOCFLAGS="" cargo doc --no-deps --document-private-items --all-features
cargo clippy --all-features
cargo +"${RUST_NIGHTLY_VERSION}" udeps
popd &>/dev/null
# Move the smoketest artifacts into smithy-rs and check the integration tests
# (which use path dependencies into the generated artifacts) against them.
mkdir -p smithy-rs/aws/sdk/build
mv aws-sdk-smoketest smithy-rs/aws/sdk/build/aws-sdk
pushd smithy-rs/aws/sdk/integration-tests
cargo check
popd &>/dev/null
pushd smithy-rs/aws/sdk/build/aws-sdk/sdk &>/dev/null
for crate_path in $(ls | grep -v "aws-"); do
if [[ -d "${crate_path}" ]]; then
pushd "${crate_path}" &>/dev/null
# Override "fail on warning" for smoke test docs since DynamoDB's modeled docs cause rustdoc warnings,
# and `cargo-check-external-types` relies on rustdoc JSON output.
RUSTDOCFLAGS="" cargo +"${RUST_NIGHTLY_VERSION}" check-external-types --all-features --config ../../../../sdk-external-types.toml
popd &>/dev/null
fi
done
popd &>/dev/null