@@ -74,9 +74,11 @@ phases:
74
74
- create-key-pair
75
75
- launch-ec2-instance --instance-type $instance_type --ami-name dlami-ubuntu
76
76
77
+ - HAS_MATCHING_CHANGES_OUTPUT=$(has-matching-changes "test/" "tests/" "src/*.py" "setup.py" "setup.cfg" "docker/*" "buildspec.yml")
78
+
77
79
# run cpu integration tests
78
80
- |
79
- if has-matching-changes "test/" "tests/" "src/*.py" "docker/*" "buildspec.yml" ; then
81
+ if [ "$HAS_MATCHING_CHANGES" = "Changes Found" ] ; then
80
82
pytest test/integration/local --region $AWS_DEFAULT_REGION --docker-base-name $PREPROD_IMAGE --framework-version $FRAMEWORK_VERSION --py-version $CPU_PY3_VERSION --processor cpu --tag $CPU_PY3_TAG
81
83
pytest test/integration/local --region $AWS_DEFAULT_REGION --docker-base-name $PREPROD_IMAGE --framework-version $FRAMEWORK_VERSION --py-version $CPU_PY2_VERSION --processor cpu --tag $CPU_PY2_TAG
82
84
else
@@ -85,7 +87,7 @@ phases:
85
87
86
88
# run gpu integration tests
87
89
- |
88
- if has-matching-changes "test/" "tests/" "src/*.py" "docker/*" "buildspec.yml" ; then
90
+ if [ "$HAS_MATCHING_CHANGES" = "Changes Found" ] ; then
89
91
printf "$SETUP_CMDS" > $SETUP_FILE
90
92
py3_cmd="pytest test/integration/local --region $AWS_DEFAULT_REGION --docker-base-name $PREPROD_IMAGE --framework-version $FRAMEWORK_VERSION --py-version $GPU_PY3_VERSION --processor gpu --tag $GPU_PY3_TAG"
91
93
py2_cmd="pytest test/integration/local --region $AWS_DEFAULT_REGION --docker-base-name $PREPROD_IMAGE --framework-version $FRAMEWORK_VERSION --py-version $GPU_PY2_VERSION --processor gpu --tag $GPU_PY2_TAG"
@@ -97,7 +99,7 @@ phases:
97
99
98
100
# run cpu sagemaker 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
pytest test/integration/sagemaker --region $AWS_DEFAULT_REGION --docker-base-name $ECR_REPO --aws-id $ACCOUNT --framework-version $FRAMEWORK_VERSION --py-version $CPU_PY3_VERSION --processor cpu --instance-type $CPU_INSTANCE_TYPE --tag $CPU_PY3_TAG
102
104
pytest test/integration/sagemaker --region $AWS_DEFAULT_REGION --docker-base-name $ECR_REPO --aws-id $ACCOUNT --framework-version $FRAMEWORK_VERSION --py-version $CPU_PY2_VERSION --processor cpu --instance-type $CPU_INSTANCE_TYPE --tag $CPU_PY2_TAG
103
105
else
@@ -106,7 +108,7 @@ phases:
106
108
107
109
# run gpu sagemaker tests
108
110
- |
109
- if has-matching-changes "test/" "tests/" "src/*.py" "docker/*" "buildspec.yml" ; then
111
+ if [ "$HAS_MATCHING_CHANGES" = "Changes Found" ] ; then
110
112
pytest test/integration/sagemaker --region $AWS_DEFAULT_REGION --docker-base-name $ECR_REPO --aws-id $ACCOUNT --framework-version $FRAMEWORK_VERSION --py-version $GPU_PY3_VERSION --processor gpu --instance-type $GPU_INSTANCE_TYPE --tag $GPU_PY3_TAG
111
113
pytest test/integration/sagemaker --region $AWS_DEFAULT_REGION --docker-base-name $ECR_REPO --aws-id $ACCOUNT --framework-version $FRAMEWORK_VERSION --py-version $CPU_PY2_VERSION --processor cpu --instance-type $CPU_INSTANCE_TYPE --tag $GPU_PY2_TAG
112
114
else
0 commit comments