@@ -10,44 +10,76 @@ phases:
10
10
# run linters
11
11
- TOX_PARALLEL_NO_SPINNER=1
12
12
- PY_COLORS=0
13
+ - start_time=`date +%s`
13
14
- tox -e flake8,pylint,twine,black-check --parallel all
15
+ - ./ci-scripts/displaytime.sh 'flake8,pylint,twine,black-check' $start_time
16
+
17
+ - start_time=`date +%s`
14
18
- tox -e sphinx
19
+ - ./ci-scripts/displaytime.sh 'sphinx' $start_time
15
20
16
21
# run unit tests
22
+ - start_time=`date +%s`
17
23
- AWS_ACCESS_KEY_ID= AWS_SECRET_ACCESS_KEY= AWS_SESSION_TOKEN=
18
24
AWS_CONTAINER_CREDENTIALS_RELATIVE_URI= AWS_DEFAULT_REGION=
19
25
tox -e py36,py27 --parallel all -- tests/unit
26
+ - ./ci-scripts/displaytime.sh 'py36,py27 unit' $start_time
27
+
28
+ - IGNORE_COVERAGE=-
20
29
21
30
# local mode tests
31
+ - start_time=`date +%s`
22
32
- |
23
33
if has-matching-changes "tests/" "src/*.py" "setup.py" "setup.cfg" "buildspec.yml"; then
24
- IGNORE_COVERAGE=- tox -e py36 -- tests/integ -m local_mode --durations 50
25
- IGNORE_COVERAGE=- tox -e py27 -- tests/integ -m local_mode --durations 50
26
- else
27
- echo "skipping integration tests"
34
+ tox -e py36 -- tests/integ -m local_mode --durations 50
28
35
fi
29
-
36
+ - ./ci-scripts/displaytime.sh 'py36 local mode' $start_time
37
+
38
+ - start_time=`date +%s`
39
+ - |
40
+ if has-matching-changes "tests/" "src/*.py" "setup.py" "setup.cfg" "buildspec.yml"; then
41
+ tox -e py27 -- tests/integ -m local_mode --durations 50
42
+ fi
43
+ - ./ci-scripts/displaytime.sh 'py27 local mode' $start_time
44
+
30
45
# run integration tests
46
+ - start_time=`date +%s`
31
47
- |
32
48
if has-matching-changes "tests/" "src/*.py" "setup.py" "setup.cfg" "buildspec.yml"; then
33
49
python3 -u ci-scripts/queue_build.py
34
- IGNORE_COVERAGE=- tox -e py36 -- tests/integ -m "not local_mode" -n 48 --reruns 3 --reruns-delay 5 --durations 50
35
- IGNORE_COVERAGE=- tox -e py27 -- tests/integ -m "not local_mode" -n 48 --reruns 3 --reruns-delay 5 --durations 50
36
- else
37
- echo "skipping integration tests"
38
50
fi
51
+ - ./ci-scripts/displaytime.sh 'build queue' $start_time
52
+
53
+ - start_time=`date +%s`
54
+ - |
55
+ if has-matching-changes "tests/" "src/*.py" "setup.py" "setup.cfg" "buildspec.yml"; then
56
+ tox -e py36 -- tests/integ -m "not local_mode" -n 48 --reruns 3 --reruns-delay 5 --durations 50
57
+ fi
58
+ - ./ci-scripts/displaytime.sh 'py36 tests/integ' $start_time
59
+
60
+ - start_time=`date +%s`
61
+ - |
62
+ if has-matching-changes "tests/" "src/*.py" "setup.py" "setup.cfg" "buildspec.yml"; then
63
+ tox -e py27 -- tests/integ -m "not local_mode" -n 48 --reruns 3 --reruns-delay 5 --durations 50
64
+ fi
65
+ - ./ci-scripts/displaytime.sh 'py27 tests/integ' $start_time
39
66
40
67
# run notebook test
68
+ - echo "running notebook test"
69
+ - start_time=`date +%s`
41
70
- |
42
- if has-matching-changes "src/*.py" "setup.py" "setup.cfg" "buildspec.yml"; then
43
- echo "running notebook test"
71
+ if has-matching-changes "src/*.py" "setup.py" "setup.cfg"; then
44
72
./tests/scripts/run-notebook-test.sh
45
- else
46
- echo "skipping notebook test"
47
- fi
73
+ fi
74
+ - ./ci-scripts/displaytime.sh ' notebook test' $start_time
75
+
48
76
post_build :
49
77
finally :
50
- - FILENAME=$(ls ci-lock/)
51
- - ACCOUNT=$(aws sts get-caller-identity --output text | awk '{print $1}')
52
- - S3_BUCKET_DIR=s3://sagemaker-us-west-2-${ACCOUNT}/ci-lock/
53
- - aws s3 rm ${S3_BUCKET_DIR}${FILENAME}
78
+ - |
79
+ if [ -d "ci-lock" ]; then
80
+ FILENAME=$(ls ci-lock/ || true)
81
+ ACCOUNT=$(aws sts get-caller-identity --output text | awk '{print $1}')
82
+ S3_BUCKET_DIR=s3://sagemaker-us-west-2-${ACCOUNT}/ci-lock/
83
+ aws s3 rm ${S3_BUCKET_DIR}${FILENAME}
84
+ fi
85
+
0 commit comments