Skip to content

Commit 9eda84e

Browse files
committed
Land rapid7#4206, fail Travis on schema.rb mismatch
Ensure that the TravisCI build will fail if db/schema.rb is changed after `rake db:migrate` is run. MSP-11616 #land
2 parents 64f2b45 + 861af1e commit 9eda84e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.travis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ env:
55
- RAKE_TASK=spec SPEC_OPTS="--tag ~content"
66

77
language: ruby
8+
matrix:
9+
fast_finish: true
810
before_install:
911
- rake --version
1012
- sudo apt-get update -qq
@@ -20,7 +22,9 @@ before_script:
2022
- bundle exec rake --version
2123
- bundle exec rake db:create
2224
- bundle exec rake db:migrate
23-
script: "bundle exec rake $RAKE_TASK"
25+
script:
26+
# fail build if db/schema.rb update is not committed
27+
- git diff --exit-code && bundle exec rake $RAKE_TASK
2428

2529
rvm:
2630
- '1.9.3'

0 commit comments

Comments
 (0)