]> git.openstreetmap.org Git - rails.git/blob - .travis.yml
Merge branch 'master' into tag-colour-preview-rebase
[rails.git] / .travis.yml
1 dist: xenial
2 language: ruby
3 rvm:
4   - 2.5.3
5 cache:
6   - bundler
7 addons:
8   postgresql: 9.5
9   apt:
10     packages:
11       - postgresql-server-dev-9.5
12       - libarchive-dev
13 services:
14   - memcached
15 env:
16   global:
17     - OSM_MEMCACHE_SERVERS="127.0.0.1"
18 before_script:
19   - sed -e "/idle_in_transaction_session_timeout/d" -e 's/ IMMUTABLE / /' -e "s/AS '.*libpgosm.*',/AS 'libpgosm',/" -e "/^--/d" db/structure.sql > db/structure.expected
20   - psql -U postgres -c "CREATE DATABASE openstreetmap"
21   - psql -U postgres -c "CREATE EXTENSION btree_gist" openstreetmap
22   - make -C db/functions libpgosm.so
23   - ln db/functions/libpgosm.so /tmp
24   - psql -U postgres -c "CREATE FUNCTION maptile_for_point(int8, int8, int4) RETURNS int4 AS '/tmp/libpgosm', 'maptile_for_point' LANGUAGE C STRICT" openstreetmap
25   - psql -U postgres -c "CREATE FUNCTION tile_for_point(int4, int4) RETURNS int8 AS '/tmp/libpgosm', 'tile_for_point' LANGUAGE C STRICT" openstreetmap
26   - psql -U postgres -c "CREATE FUNCTION xid_to_int4(xid) RETURNS int4 AS '/tmp/libpgosm', 'xid_to_int4' LANGUAGE C STRICT" openstreetmap
27   - cp config/travis.database.yml config/database.yml
28   - cp config/example.storage.yml config/storage.yml
29   - touch config/settings.local.yml
30   - bundle exec rake db:migrate
31   - bundle exec rake i18n:js:export
32   - bundle exec rake yarn:install
33 script:
34   - bundle exec rubocop -f fuubar
35   - bundle exec rake eslint
36   - bundle exec erblint .
37   - bundle exec rake db:structure:dump
38   - sed -e "/idle_in_transaction_session_timeout/d" -e 's/ IMMUTABLE / /' -e "s/AS '.*libpgosm.*',/AS 'libpgosm',/" -e "/^--/d" db/structure.sql > db/structure.actual
39   - diff -uw db/structure.expected db/structure.actual
40   - bundle exec rake test:db