Skip to content

Commit c2d9cc8

Browse files
authored
add notebook test to ci builds (aws#680)
* remove travis config * add notebook test to pr build * fix checks guarding notebook and integration tests
1 parent 851e51a commit c2d9cc8

File tree

2 files changed

+29
-12
lines changed

2 files changed

+29
-12
lines changed

.travis.yml

Lines changed: 0 additions & 10 deletions
This file was deleted.

buildspec.yml

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,33 @@ phases:
1919
AWS_CONTAINER_CREDENTIALS_RELATIVE_URI= AWS_DEFAULT_REGION=
2020
tox -e py27,py36 -- tests/unit
2121

22+
# run notebook test
23+
- |
24+
if has-matching-changes "src/*.py" "setup.py" "setup.cfg"; then
25+
echo "running notebook test"
26+
python setup.py sdist
27+
aws s3 --region us-west-2 cp ./dist/sagemaker-*.tar.gz s3://sagemaker-python-sdk-pr/
28+
aws s3 cp s3://sagemaker-mead-cli/mead-nb-test.tar.gz mead-nb-test.tar.gz
29+
tar -xzf mead-nb-test.tar.gz
30+
git clone --depth 1 https://github.com/awslabs/amazon-sagemaker-examples.git
31+
JAVA_HOME=$(get-java-home)
32+
echo "set JAVA_HOME=$JAVA_HOME"
33+
SAGEMAKER_ROLE_ARN=$(get-sagemaker-role-arn)
34+
echo "set SAGEMAKER_ROLE_ARN=$SAGEMAKER_ROLE_ARN"
35+
./runtime/bin/mead-run-nb-test \
36+
--instance-type ml.c4.8xlarge \
37+
--region us-west-2 \
38+
--lifecycle-config-name install-python-sdk \
39+
--notebook-instance-role-arn $SAGEMAKER_ROLE_ARN \
40+
./amazon-sagemaker-examples/sagemaker-python-sdk/tensorflow_distributed_mnist/tensorflow_batch_transform_mnist.ipynb
41+
else
42+
echo "skipping notebook test"
43+
fi
44+
2245
# run integration tests
23-
- if-matching-changes "test/" "tests/" "src/*.py" "docker/*/Dockerfile" &&
24-
IGNORE_COVERAGE=- tox -e py27,py36 -- -n 24 --boxed tests/integ
46+
- |
47+
if has-matching-changes "tests/" "src/*.py" "setup.py" "setup.cfg"; then
48+
IGNORE_COVERAGE=- tox -e py27,py36 -- -n 24 --boxed tests/integ
49+
else
50+
echo "skipping integration tests"
51+
fi

0 commit comments

Comments
 (0)