annotate bin/run_test @ 432:b6cabed63bc7

Add missing translation
author nanaya <me@myconan.net>
date Fri, 13 May 2016 03:59:39 +0900
parents 4f7fb63f0537
children d31fe32da7a0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
300
f84df8a294e6 Put build script to bin/.
edogawaconan <me@myconan.net>
parents:
diff changeset
1 #!/bin/sh
f84df8a294e6 Put build script to bin/.
edogawaconan <me@myconan.net>
parents:
diff changeset
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
f84df8a294e6 Put build script to bin/.
edogawaconan <me@myconan.net>
parents:
diff changeset
5 test true = "$CI" && bi_params="--without development"
f84df8a294e6 Put build script to bin/.
edogawaconan <me@myconan.net>
parents:
diff changeset
6 bundle install $bi_params
f84df8a294e6 Put build script to bin/.
edogawaconan <me@myconan.net>
parents:
diff changeset
7
f84df8a294e6 Put build script to bin/.
edogawaconan <me@myconan.net>
parents:
diff changeset
8 if ! test -f config/database.yml; then
f84df8a294e6 Put build script to bin/.
edogawaconan <me@myconan.net>
parents:
diff changeset
9 cat << EOF > config/database.yml
f84df8a294e6 Put build script to bin/.
edogawaconan <me@myconan.net>
parents:
diff changeset
10 test:
f84df8a294e6 Put build script to bin/.
edogawaconan <me@myconan.net>
parents:
diff changeset
11 adapter: postgresql
f84df8a294e6 Put build script to bin/.
edogawaconan <me@myconan.net>
parents:
diff changeset
12 database: zp_test
f84df8a294e6 Put build script to bin/.
edogawaconan <me@myconan.net>
parents:
diff changeset
13 user: postgres
f84df8a294e6 Put build script to bin/.
edogawaconan <me@myconan.net>
parents:
diff changeset
14 EOF
f84df8a294e6 Put build script to bin/.
edogawaconan <me@myconan.net>
parents:
diff changeset
15 fi
f84df8a294e6 Put build script to bin/.
edogawaconan <me@myconan.net>
parents:
diff changeset
16
f84df8a294e6 Put build script to bin/.
edogawaconan <me@myconan.net>
parents:
diff changeset
17 if ! test -f config/local_config.rb; then
f84df8a294e6 Put build script to bin/.
edogawaconan <me@myconan.net>
parents:
diff changeset
18 # rake requires booting Rails which in turn requires availability of
f84df8a294e6 Put build script to bin/.
edogawaconan <me@myconan.net>
parents:
diff changeset
19 # local_config.
f84df8a294e6 Put build script to bin/.
edogawaconan <me@myconan.net>
parents:
diff changeset
20 touch config/local_config.rb
f84df8a294e6 Put build script to bin/.
edogawaconan <me@myconan.net>
parents:
diff changeset
21 cat << EOF > config/local_config.rb
f84df8a294e6 Put build script to bin/.
edogawaconan <me@myconan.net>
parents:
diff changeset
22 CONFIG["standalone"] = true
f84df8a294e6 Put build script to bin/.
edogawaconan <me@myconan.net>
parents:
diff changeset
23 CONFIG["secret_key"] = "$(bundle exec rake secret)"
f84df8a294e6 Put build script to bin/.
edogawaconan <me@myconan.net>
parents:
diff changeset
24 EOF
f84df8a294e6 Put build script to bin/.
edogawaconan <me@myconan.net>
parents:
diff changeset
25 fi
f84df8a294e6 Put build script to bin/.
edogawaconan <me@myconan.net>
parents:
diff changeset
26
305
4f7fb63f0537 db:setup for test.
edogawaconan <me@myconan.net>
parents: 301
diff changeset
27 RAILS_ENV=test bundle exec rake db:setup
300
f84df8a294e6 Put build script to bin/.
edogawaconan <me@myconan.net>
parents:
diff changeset
28 bundle exec rake