Skip to content

Instantly share code, notes, and snippets.

@palkan
Last active September 26, 2024 20:11
Show Gist options
  • Save palkan/8deb456fcd49a1b27164 to your computer and use it in GitHub Desktop.
Save palkan/8deb456fcd49a1b27164 to your computer and use it in GitHub Desktop.
Travis config for TH project
language: ruby
rvm:
- 2.2.3
# Если Travis пишет вам слишком часто, то отключаем email уведомления
notifications:
email: false
# Указываем базу данных
addons:
postgresql: "9.4"
# Аргументы для bundler
bundler_args: --without development --deployment --jobs=3 --retry=3
# Кэшируем гемы, чтобы не устанавливать каждый раз все заново
cache: bundler
before_script:
- sudo service postgresql stop
- sudo service postgresql start
# Создаем базу
- psql -c 'create database th_demo_test;' -U postgres
# Копируем конфиги
- cp config/database.travis.yml config/database.yml
- cp config/secrets.travis.yml config/secrets.yml
# Формируем структуру базы
- bundle exec rake db:setup
# Запускаем PrivatePub
- 'bundle exec rackup -s puma -E production private_pub.ru &'
# Ждем, пока PrivatePub проинициализируется
- sleep 3
gemfile:
- Gemfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment