forked from idbygeorge/salsa
-
Notifications
You must be signed in to change notification settings - Fork 5
/
.travis.yml
40 lines (37 loc) · 1.42 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
addons:
postgresql: 9.6
apt:
packages:
- docker-ce
before_script:
- mkdir tmp/db/postgres-data -p
- mkdir tmp/log -p
- cp config/deploy/travis-ci/database.yml config/database.yml
- cp config/deploy/travis-ci/application.yml config/application.yml
- cp config/deploy/travis-ci/config.yml config/config.yml
- cp config/deploy/travis-ci/secrets.yml config/secrets.yml
- cp config/deploy/travis-ci/Dockerfile ../
- cp config/deploy/travis-ci/docker-compose.yml ../
- psql -c 'create database travis_ci_test;' -U postgres
- 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
- sudo docker-compose build
- sudo docker-compose run salsa rake db:create
- sudo docker-compose run salsa rake db:schema:load
- sudo docker-compose run salsa rake db:migrate
- sudo docker-compose run salsa rake db:seed
script:
- sudo docker-compose run salsa rake db:schema:load RAILS_ENV=test
- sudo docker-compose run salsa rake db:migrate RAILS_ENV=test
- sudo docker-compose run salsa bash ./cucumber.sh
- sudo docker-compose run salsa bash ./rspec.sh
after_script:
- sudo docker-compose run salsa ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT --prefix /home/apps/salsa -r $CC_TEST_REPORTER_ID
dist: trusty
language: ruby
rvm:
- 2.4.1
services:
- redis-server
sudo: required