-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
54 lines (45 loc) · 1.83 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
rvm:
- 2.7.1
addon:
postgresql: "10"
apt:
packages:
- postgresql-10
- postgresql-client-10
notifications:
email: false
env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true
- CC_TEST_REPORTER_ID=2fb282f54ad990d39d0c0801d92f4554adce97dac8d4eb0dc66dc96301f969c9
- PGPORT=5432
before_install:
- nvm install node
- 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 locale-gen --no-archive es_CO.UTF-8
- sudo /etc/init.d/postgresql stop
- sudo /etc/init.d/postgresql start 10
- psql -c 'CREATE DATABASE heb412_pru;' -U postgres
- gem install bundler
- gem update --system
- bundle update --bundler
- bundle install
- yarn install
- cp config/database.travis.yml config/database.yml
- cp config/application.rb.plantilla config/application.rb
- cp config/routes.rb.plantilla config/routes.rb
- cp config/initializers/msip.rb.plantilla config/initializers/msip.rb
- cp config/initializers/punto_montaje.rb.plantilla config/initializers/punto_montaje.rb
- cp db/structure.sql db/structure.sql.copia # travis no soporta PostreSQL 10
- sed -e 's/provider = libc,//g;s/SET default_table_access_method.*/-- &/g' db/structure.sql.copia > db/structure.sql
- cp config/routes.rb.plantilla config/routes.rb
- rake db:setup
- rake msip:indices
- bin/rails assets:precompile --trace
script:
- bundle exec rails test -b
after_script:
- ./cc-test-reporter after-build -t simplecov --exit-code $TRAVIS_TEST_RESULT