Mercurial > zeropaste
annotate bin/run_test @ 362:cbf116933259
Update to rails 4.2.
author | edogawaconan <me@myconan.net> |
---|---|
date | Sat, 20 Dec 2014 17:57:34 +0900 |
parents | 4f7fb63f0537 |
children | d31fe32da7a0 |
rev | line source |
---|---|
300 | 1 #!/bin/sh |
2 | |
301
2fb00d365745
Add set -x to view commands executed for test.
edogawaconan <me@myconan.net>
parents:
300
diff
changeset
|
3 set -x |
2fb00d365745
Add set -x to view commands executed for test.
edogawaconan <me@myconan.net>
parents:
300
diff
changeset
|
4 |
300 | 5 test true = "$CI" && bi_params="--without development" |
6 bundle install $bi_params | |
7 | |
8 if ! test -f config/database.yml; then | |
9 cat << EOF > config/database.yml | |
10 test: | |
11 adapter: postgresql | |
12 database: zp_test | |
13 user: postgres | |
14 EOF | |
15 fi | |
16 | |
17 if ! test -f config/local_config.rb; then | |
18 # rake requires booting Rails which in turn requires availability of | |
19 # local_config. | |
20 touch config/local_config.rb | |
21 cat << EOF > config/local_config.rb | |
22 CONFIG["standalone"] = true | |
23 CONFIG["secret_key"] = "$(bundle exec rake secret)" | |
24 EOF | |
25 fi | |
26 | |
305 | 27 RAILS_ENV=test bundle exec rake db:setup |
300 | 28 bundle exec rake |