Created
December 16, 2014 20:29
-
-
Save kcurtin/71c9773c2a1db501f43f to your computer and use it in GitHub Desktop.
Travis
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
before_script: | |
- ./script/travis/setup_db.sh | |
script: bundle exec rspec spec/ --tag $TEST_TAG | |
env: | |
matrix: | |
- TEST_TAG=js DB_TEST=1 | |
- TEST_TAG=~js DB_TEST=2 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
cp config/travis_database.yml config/database.yml | |
echo "checkpoint_segments='9'\ncheckpoint_timeout='30min'\nfsync='off'\nfull_page_writes='off'\nsynchronous_commit='off'" | sudo tee -a /etc/postgresql/9.3/main/postgresql.conf | |
psql -c 'create database my_test_1' -U postgres | |
psql -c "create extension hstore;" "my_test_1" | |
psql -U postgres -q -d my_test_1 -f db/structure.sql | |
echo "checkpoint_segments='9'\ncheckpoint_timeout='30min'\nfsync='off'\nfull_page_writes='off'\nsynchronous_commit='off'" | sudo tee -a /etc/postgresql/9.3/main/postgresql.conf | |
psql -c 'create database my_test_2' -U postgres | |
psql -c "create extension hstore;" "my_test_2" | |
psql -U postgres -q -d my_test_2 -f db/structure.sql | |
sudo /etc/init.d/postgresql restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test: | |
adapter: postgresql | |
database: my_test_<%= ENV['DB_TEST'] %> | |
username: postgres | |
pool: 10 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment