Skip to content

Commit c8e8029

Browse files
ssbarneagaborbernat
authored andcommitted
travis: fail fast if rebuild-script was not called (#1194)
Avoid running tests if rebuild-script is making repository dirty because this means that code was commited without rebuilding first. This prevents wasted time on reviews.
1 parent 79c9dac commit c8e8029

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.travis.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ matrix:
2020
- python: 2.7
2121
env: TOXENV=docs
2222

23-
install: pip install tox
23+
install:
24+
# detecting invalid commits that missed rebuild-script.
25+
- ./bin/rebuild-script.py && git diff-files --quiet || { >&2 echo "Code submitted without running ./bin/rebuild-script.py first."; exit 1; }
26+
- pip install tox
2427

2528
script: tox
2629

0 commit comments

Comments
 (0)