pasosdeJesus/cor1440_gen

View on GitHub
.travis.yml

Summary

Maintainability
Test Coverage
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=3060021dfb597aeb61e254a2e49db4e7f1fb245f39b1322c23dd1dc95803de6e
                - 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 9.6
        - cd test/dummy
        - psql -c 'CREATE DATABASE cor1440gen_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 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 
        - rake db:setup
        - rake msip:indices
        - cd ../..

script: 
        - CONFIG_HOSTS=www.example.com bundle exec rails test -b

after_script:
        - ./cc-test-reporter after-build -t simplecov --exit-code $TRAVIS_TEST_RESULT