@@ -86,9 +86,11 @@ phases:
86
86
- create-key-pair
87
87
- launch-ec2-instance --instance-type $instance_type --ami-name dlami-ubuntu
88
88
89
+ - HAS_MATCHING_CHANGES_OUTPUT=$(has-matching-changes "test/" "tests/" "src/*.py" "setup.py" "docker/*" "buildspec.yml")
90
+
89
91
# run cpu integration tests
90
92
- |
91
- if has-matching-changes "test/" "tests/" "src/*.py" "docker/*" "buildspec.yml" ; then
93
+ if [ "$HAS_MATCHING_CHANGES" = "Changes Found" ] ; then
92
94
pytest test/integration/local --region $AWS_DEFAULT_REGION --docker-base-name $PREPROD_IMAGE --tag $CPU_TAG_PY2 --framework-version $FRAMEWORK_VERSION --py-version 2 --processor cpu
93
95
pytest test/integration/local --region $AWS_DEFAULT_REGION --docker-base-name $PREPROD_IMAGE --tag $CPU_TAG_PY3 --framework-version $FRAMEWORK_VERSION --py-version 3 --processor cpu
94
96
else
@@ -97,7 +99,7 @@ phases:
97
99
98
100
# run gpu integration tests
99
101
- |
100
- if has-matching-changes "test/" "tests/" "src/*.py" "docker/*" "buildspec.yml" ; then
102
+ if [ "$HAS_MATCHING_CHANGES" = "Changes Found" ] ; then
101
103
printf "$SETUP_CMDS" > $SETUP_FILE
102
104
cmd="pytest test/integration/local --region $AWS_DEFAULT_REGION --docker-base-name $PREPROD_IMAGE --tag $GPU_TAG_PY2 --framework-version $FRAMEWORK_VERSION --py-version 2 --processor gpu"
103
105
remote-test --github-repo $GITHUB_REPO --test-cmd "$cmd" --setup-file $SETUP_FILE --pr-number "$PR_NUM"
@@ -109,7 +111,7 @@ phases:
109
111
110
112
# run sagemaker tests
111
113
- |
112
- if has-matching-changes "test/" "tests/" "src/*.py" "docker/*" "buildspec.yml" ; then
114
+ if [ "$HAS_MATCHING_CHANGES" = "Changes Found" ] ; then
113
115
pytest test/integration/sagemaker -n 8 --region $AWS_DEFAULT_REGION --docker-base-name $ECR_REPO --account-id $ACCOUNT --tag $CPU_TAG_PY2 --py-version 2 --processor cpu
114
116
pytest test/integration/sagemaker -n 8 --region $AWS_DEFAULT_REGION --docker-base-name $ECR_REPO --account-id $ACCOUNT --tag $GPU_TAG_PY2 --py-version 2 --processor gpu
115
117
pytest test/integration/sagemaker -n 8 --region $AWS_DEFAULT_REGION --docker-base-name $ECR_REPO --account-id $ACCOUNT --tag $CPU_TAG_PY3 --py-version 3 --processor cpu
0 commit comments