Skip to content

Commit 73d41fc

Browse files
authored
fix: only run one test during deployment (#212)
1 parent bddf48d commit 73d41fc

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

buildspec-release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ phases:
5454
- py3_cmd="IGNORE_COVERAGE=- tox -e py36 -- test/integration/local --docker-base-name $base_name --framework-version $FRAMEWORK_VERSION --processor gpu"
5555
- remote-test --github-repo sagemaker-tensorflow-container --branch script-mode --test-cmd "$py3_cmd" --skip-setup
5656

57+
- IGNORE_COVERAGE=- tox -e py36 -- test/integration/sagemaker -n 24 --region $AWS_DEFAULT_REGION --account-id 142577830533 --docker-base-name sagemaker-tensorflow-scriptmode --framework-version $FRAMEWORK_VERSION --processor cpu,gpu --py-version 2,3
58+
5759
- |
5860
echo '[{
5961
"repository": "sagemaker-tensorflow-scriptmode",
@@ -71,7 +73,7 @@ phases:
7173
"dest": ["1.13.1-gpu-py3", "1.13-gpu-py3", "1.13.1-gpu-py3-'${CODEBUILD_BUILD_ID#*:}'"]
7274
}],
7375
"test": [
74-
"IGNORE_COVERAGE=- tox -e py36 -- test/integration/sagemaker -n 32 --region {region} --account-id 520713654638 --docker-base-name sagemaker-tensorflow-scriptmode --framework-version 1.13.1 --processor cpu,gpu --py-version 2,3"
76+
"IGNORE_COVERAGE=- tox -e py36 -- -m deploy_test test/integration/sagemaker -n 4 --region {region} --account-id 520713654638 --docker-base-name sagemaker-tensorflow-scriptmode --framework-version 1.13.1 --processor cpu,gpu --py-version 2,3"
7577
]
7678
}]' > deployments.json
7779

test/integration/sagemaker/test_mnist.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,14 @@
1515
import os
1616

1717
import boto3
18+
import pytest
1819
from sagemaker.tensorflow import TensorFlow
1920
from six.moves.urllib.parse import urlparse
2021

2122
from utils import processor, py_version, unique_name_from_base # noqa: F401
2223

2324

25+
@pytest.mark.deploy_test
2426
def test_mnist(sagemaker_session, ecr_image, instance_type, framework_version):
2527
resource_path = os.path.join(os.path.dirname(__file__), '../..', 'resources')
2628
script = os.path.join(resource_path, 'mnist', 'mnist.py')

0 commit comments

Comments
 (0)