Skip to content

Commit 6f7d39a

Browse files
authored
infra: properly fail PR build if has-matching-changes fails (aws#1264)
1 parent 63cccdf commit 6f7d39a

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

buildspec-localmodetests.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@ phases:
1111

1212
# local mode tests
1313
- start_time=`date +%s`
14+
- HAS_MATCHING_CHANGES_OUTPUT=$(has-matching-changes "tests/" "src/*.py" "setup.py" "setup.cfg" "buildspec.yml")
1415
- |
15-
if has-matching-changes "tests/" "src/*.py" "setup.py" "setup.cfg" "buildspec.yml"; then
16+
if [ "$HAS_MATCHING_CHANGES" = "Changes Found" ] ; then
1617
tox -e py36 -- tests/integ -m local_mode --durations 50
1718
fi
1819
- ./ci-scripts/displaytime.sh 'py36 local mode' $start_time
1920

2021
- start_time=`date +%s`
2122
- |
22-
if has-matching-changes "tests/" "src/*.py" "setup.py" "setup.cfg" "buildspec.yml"; then
23+
if [ "$HAS_MATCHING_CHANGES" = "Changes Found" ] ; then
2324
tox -e py27 -- tests/integ -m local_mode --durations 50
2425
fi
2526
- ./ci-scripts/displaytime.sh 'py27 local mode' $start_time

buildspec-notebooktests.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@ phases:
66
# run notebook test
77
- echo "running notebook test"
88
- start_time=`date +%s`
9+
- HAS_MATCHING_CHANGES_OUTPUT=$(has-matching-changes "src/*.py" "setup.py" "setup.cfg" "tests/scripts/run-notebook-test.sh")
910
- |
10-
if has-matching-changes "src/*.py" "setup.py" "setup.cfg" "tests/scripts/run-notebook-test.sh"; then
11+
if [ "$HAS_MATCHING_CHANGES" = "Changes Found" ] ; then
1112
./tests/scripts/run-notebook-test.sh
1213
fi
1314
- ./ci-scripts/displaytime.sh 'notebook test' $start_time

buildspec.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,16 @@ phases:
1111

1212
# run integration tests
1313
- start_time=`date +%s`
14+
- HAS_MATCHING_CHANGES_OUTPUT=$(has-matching-changes "tests/" "src/*.py" "setup.py" "setup.cfg" "buildspec.yml")
1415
- |
15-
if has-matching-changes "tests/" "src/*.py" "setup.py" "setup.cfg" "buildspec.yml"; then
16+
if [ "$HAS_MATCHING_CHANGES" = "Changes Found" ] ; then
1617
python3 -u ci-scripts/queue_build.py
1718
fi
1819
- ./ci-scripts/displaytime.sh 'build queue' $start_time
1920

2021
- start_time=`date +%s`
2122
- |
22-
if has-matching-changes "tests/" "src/*.py" "setup.py" "setup.cfg" "buildspec.yml"; then
23+
if [ "$HAS_MATCHING_CHANGES" = "Changes Found" ] ; then
2324
tox -e py36 -- tests/integ -m "not local_mode" -n 512 --reruns 3 --reruns-delay 5 --durations 50 --boto-config '{"region_name": "us-east-2"}'
2425
fi
2526
- ./ci-scripts/displaytime.sh 'py36 tests/integ' $start_time

0 commit comments

Comments
 (0)