forked from Children-in-Families/oscar-web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
53 lines (53 loc) · 1.62 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
41
42
43
44
45
46
47
48
49
50
51
52
53
language: ruby
dist: xenial
rvm:
- 2.3.3
cache:
- bundler
- yarn
before_script:
- export PATH="/usr/lib/postgresql/11/bin:$PATH"
- psql -c 'CREATE ROLE travis SUPERUSER LOGIN CREATEDB;' -U postgres
- psql -c 'CREATE DATABASE oscar_web_test;' -U postgres
- sleep 15
- mongo oscar_web_test --eval 'db.createUser({user:"travis",pwd:"test",roles:["readWrite"]});'
- bundle install --jobs=3 --retry=3
- yarn
- bundle exec rake db:create
- bundle exec rake db:schema:load
- bundle exec danger
before_install:
- nvm install --lts
- gem install bundler -v '1.17.3'
- sudo service postgresql stop
- sudo apt-get -q update
- sudo apt-get --yes remove postgresql-10-postgis-2.4
- sudo apt install -yq --no-install-suggests --no-install-recommends postgresql-11 postgresql-client-11
- sed -e 's/^port.*/port = 5432/' /etc/postgresql/11/main/postgresql.conf > postgresql.conf
- sudo chown postgres postgresql.conf
- sudo mv postgresql.conf /etc/postgresql/11/main
- sudo cp /etc/postgresql/{10,11}/main/pg_hba.conf
- sudo service postgresql restart 11
script:
- bundle exec rspec spec
services:
- redis-server
- mongodb
env:
global:
- PGPORT=5432
- DATABASE_NAME_TEST=oscar_web_test
- DATABASE_USER=postgres
- DATABASE_HOST=localhost
- HISTORY_DATABASE_HOST=localhost
- HISTORY_DATABASE_NAME=oscar-history_test
- CASE_WORKER_CLIENT_OFFLINE_DATABASE=case_worker_client_offline_test
notifications:
email:
recipients:
on_success: never
on_failure: always