.travis.yml
addons:
ssh_known_hosts: stage.babywearing.exchange
env:
global:
- CC_TEST_REPORTER_ID=b80cc9abeed21ed522cf2d3831da7ed52dfd6e18bdce2ade4125fd033e96a951
language: ruby
cache:
bundler: true
rvm:
- 2.7.1
before_install:
- gem install bundler:1.17.3
services:
- postgresql
before_script:
- psql -c 'create database travis_ci_test;' -U postgres
- cp config/database.yml config/database.yml.bak
- cp config/database.yml.travis config/database.yml
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script:
- bundle exec rspec
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
before_deploy:
- openssl aes-256-cbc -K $encrypted_40af3bd1890e_key -iv $encrypted_40af3bd1890e_iv -in deploy/babywearing-stage.enc -out $HOME/babywearing_id -d
- openssl aes-256-cbc -K $encrypted_8ad82cc635a3_key -iv $encrypted_8ad82cc635a3_iv -in deploy/master.key.enc -out config/master.key -d
- chmod 600 $HOME/babywearing_id
deploy:
skip_cleanup: true
provider: script
script: gem install mina && gem install mina-puma && mina -f deploy/deploy.rb deploy server_name=stage
on:
branch: master