@@ -76,9 +76,11 @@ phases:
76
76
- create-key-pair
77
77
- launch-ec2-instance --instance-type $instance_type --ami-name dlami-ubuntu
78
78
79
+ - HAS_MATCHING_CHANGES_OUTPUT=$(has-matching-changes "test/" "tests/" "src/*.py" "setup.py" "setup.cfg" "docker/*" "buildspec.yml")
80
+
79
81
# run cpu integration tests
80
82
- |
81
- if has-matching-changes "test/" "tests/" "src/*.py" "docker/*" "buildspec.yml" ; then
83
+ if [ "$HAS_MATCHING_CHANGES" = "Changes Found" ] ; then
82
84
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
83
85
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
84
86
else
@@ -87,7 +89,7 @@ phases:
87
89
88
90
# run gpu integration tests
89
91
- |
90
- if has-matching-changes "test/" "tests/" "src/*.py" "docker/*" "buildspec.yml" ; then
92
+ if [ "$HAS_MATCHING_CHANGES" = "Changes Found" ] ; then
91
93
printf "$SETUP_CMDS" > $SETUP_FILE
92
94
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"
93
95
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"
@@ -99,7 +101,7 @@ phases:
99
101
100
102
# run cpu sagemaker tests
101
103
- |
102
- if has-matching-changes "test/" "tests/" "src/*.py" "docker/*" "buildspec.yml" ; then
104
+ if [ "$HAS_MATCHING_CHANGES" = "Changes Found" ] ; then
103
105
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
104
106
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
105
107
else
@@ -108,7 +110,7 @@ phases:
108
110
109
111
# run gpu sagemaker tests
110
112
- |
111
- if has-matching-changes "test/" "tests/" "src/*.py" "docker/*" "buildspec.yml" ; then
113
+ if [ "$HAS_MATCHING_CHANGES" = "Changes Found" ] ; then
112
114
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
113
115
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
114
116
else
0 commit comments