Skip to content

Commit 6a90f28

Browse files
committed
change: print build execution time
1 parent 5966653 commit 6a90f28

File tree

1 file changed

+24
-36
lines changed

1 file changed

+24
-36
lines changed

buildspec.yml

+24-36
Original file line numberDiff line numberDiff line change
@@ -25,51 +25,39 @@ phases:
2525
tox -e py36,py27 --parallel all -- tests/unit
2626
- ./ci-scripts/displaytime.sh 'py36,py27 unit' $start_time
2727

28+
- IGNORE_COVERAGE=-
29+
2830
# local mode tests
29-
- |
30-
if has-matching-changes "tests/" "src/*.py" "setup.py" "setup.cfg" "buildspec.yml"; then
31-
start_time=`date +%s`
32-
IGNORE_COVERAGE=- tox -e py36 -- tests/integ -m local_mode --durations 50
33-
./ci-scripts/displaytime.sh 'py36 local mode' $start_time
31+
- has-matching-changes "tests/" "src/*.py" "setup.py" "setup.cfg" "buildspec.yml"; HAS_CHANGES=$?
3432

35-
start_time=`date +%s`
36-
IGNORE_COVERAGE=- tox -e py27 -- tests/integ -m local_mode --durations 50
37-
./ci-scripts/displaytime.sh 'py27 local mode' $start_time
33+
- start_time=`date +%s`
34+
- test HAS_CHANGES -ne 0 && tox -e py36 -- tests/integ -m local_mode --durations 50
35+
- ./ci-scripts/displaytime.sh 'py36 local mode' $start_time
3836

39-
else
40-
echo "skipping integration tests"
41-
fi
42-
43-
# run integration tests
44-
- |
45-
if has-matching-changes "tests/" "src/*.py" "setup.py" "setup.cfg" "buildspec.yml"; then
46-
start_time=`date +%s`
47-
python3 -u ci-scripts/queue_build.py
48-
./ci-scripts/displaytime.sh 'build queue' $start_time
37+
- start_time=`date +%s`
38+
- test HAS_CHANGES -ne 0 && tox -e py27 -- tests/integ -m local_mode --durations 50
39+
- ./ci-scripts/displaytime.sh 'py27 local mode' $start_time
4940

50-
start_time=`date +%s`
51-
IGNORE_COVERAGE=- tox -e py36 -- tests/integ -m "not local_mode" -n 48 --reruns 3 --reruns-delay 5 --durations 50
52-
./ci-scripts/displaytime.sh 'py36 tests/integ' $start_time
41+
# run integration tests
42+
- start_time=`date +%s`
43+
- test HAS_CHANGES -ne 0 && python3 -u ci-scripts/queue_build.py
44+
- ./ci-scripts/displaytime.sh 'build queue' $start_time
5345

54-
start_time=`date +%s`
55-
IGNORE_COVERAGE=- tox -e py27 -- tests/integ -m "not local_mode" -n 48 --reruns 3 --reruns-delay 5 --durations 50
56-
./ci-scripts/displaytime.sh 'py27 tests/integ' $start_time
46+
- start_time=`date +%s`
47+
- test HAS_CHANGES -ne 0 && tox -e py36 -- tests/integ -m "not local_mode" -n 48 --reruns 3 --reruns-delay 5 --durations 50
48+
- ./ci-scripts/displaytime.sh 'py36 tests/integ' $start_time
5749

58-
else
59-
echo "skipping integration tests"
60-
fi
50+
- start_time=`date +%s`
51+
- test HAS_CHANGES -ne 0 && tox -e py27 -- tests/integ -m "not local_mode" -n 48 --reruns 3 --reruns-delay 5 --durations 50
52+
- ./ci-scripts/displaytime.sh 'py27 tests/integ' $start_time
6153

6254
# run notebook test
63-
- |
64-
if has-matching-changes "src/*.py" "setup.py" "setup.cfg" "buildspec.yml"; then
65-
echo "running notebook test"
66-
start_time=`date +%s`
67-
./tests/scripts/run-notebook-test.sh
68-
./ci-scripts/displaytime.sh 'notebook test' $start_time
55+
- has-matching-changes "src/*.py" "setup.py" "setup.cfg"; HAS_CHANGES=$?
56+
- echo "running notebook test"
57+
- start_time=`date +%s`
58+
- test HAS_CHANGES -ne 0 && ./tests/scripts/run-notebook-test.sh
59+
- ./ci-scripts/displaytime.sh 'notebook test' $start_time
6960

70-
else
71-
echo "skipping notebook test"
72-
fi
7361
post_build:
7462
finally:
7563
- FILENAME=$(ls ci-lock/)

0 commit comments

Comments
 (0)