-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
57 lines (49 loc) · 1.64 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
54
55
56
language: ruby
rvm:
- 3.0.1
addons:
postgresql: '10'
chrome: stable
apt:
sources:
- google-chrome
packages:
- libproj9
- postgresql-10-postgis-2.4
- postgresql-client-10
- chromium-chromedriver
notifications:
email: false
env:
global:
- NOKOGIRI_USE_SYSTEM_LIBRARIES=true
- CC_TEST_REPORTER_ID=09993c70831fe6712b6be6aba56140d742bd5524988c91ca78d549388cb66188
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 apt install -y postgresql-10-postgis-2.4
- 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 sijrscol_pru;' -U postgres
- psql -c 'CREATE EXTENSION postgis;' -U postgres -d sijrscol_pru
- gem install bundler
- gem update --system
- bundle update --bundler
- bundle install
- yarn install
- cp .env.travis .env
- cp config/database.ci.yml config/database.yml
- cp db/structure.sql db/structure.sql.copia
- sed -e 's/provider = libc,//g;s/SET default_table_access_method.*/-- &/g' db/structure.sql.copia > db/structure.sql
- bundle exec bin/rails db:setup
- bundle exec bin/rails msip:indices
script:
- CONFIG_HOSTS=www.example.com bin/rails test
# Más complejo de lo esperado, ver:
# https://gitlab.com/pasosdeJesus/si_jrscol/-/issues/317
#- CONFIG_HOSTS=127.0.0.1 bin/rails test:system
after_script:
- ./cc-test-reporter after-build -t simplecov --exit-code $TRAVIS_TEST_RESULT