Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add notebook test to ci builds #680

Merged
merged 3 commits into from
Mar 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

31 changes: 29 additions & 2 deletions buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,33 @@ phases:
AWS_CONTAINER_CREDENTIALS_RELATIVE_URI= AWS_DEFAULT_REGION=
tox -e py27,py36 -- tests/unit

# run notebook test
- |
if has-matching-changes "src/*.py" "setup.py" "setup.cfg"; then
echo "running notebook test"
python setup.py sdist
aws s3 --region us-west-2 cp ./dist/sagemaker-*.tar.gz s3://sagemaker-python-sdk-pr/
aws s3 cp s3://sagemaker-mead-cli/mead-nb-test.tar.gz mead-nb-test.tar.gz
tar -xzf mead-nb-test.tar.gz
git clone --depth 1 https://github.com/awslabs/amazon-sagemaker-examples.git
JAVA_HOME=$(get-java-home)
echo "set JAVA_HOME=$JAVA_HOME"
SAGEMAKER_ROLE_ARN=$(get-sagemaker-role-arn)
echo "set SAGEMAKER_ROLE_ARN=$SAGEMAKER_ROLE_ARN"
./runtime/bin/mead-run-nb-test \
--instance-type ml.c4.8xlarge \
--region us-west-2 \
--lifecycle-config-name install-python-sdk \
--notebook-instance-role-arn $SAGEMAKER_ROLE_ARN \
./amazon-sagemaker-examples/sagemaker-python-sdk/tensorflow_distributed_mnist/tensorflow_batch_transform_mnist.ipynb
else
echo "skipping notebook test"
fi

# run integration tests
- if-matching-changes "test/" "tests/" "src/*.py" "docker/*/Dockerfile" &&
IGNORE_COVERAGE=- tox -e py27,py36 -- -n 24 --boxed tests/integ
- |
if has-matching-changes "tests/" "src/*.py" "setup.py" "setup.cfg"; then
IGNORE_COVERAGE=- tox -e py27,py36 -- -n 24 --boxed tests/integ
else
echo "skipping integration tests"
fi