This repository has been archived by the owner on Apr 22, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 21
/
.travis.yml
45 lines (45 loc) · 2.1 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
env:
# Based on https://github.com/grosser/parallel_tests/issues/649#issuecomment-487100470
- POSTGRESQL_VERSION=9.6
BUNDLE_DISABLE_EXEC_LOAD=true
- POSTGRESQL_VERSION=10
BUNDLE_DISABLE_EXEC_LOAD=true
- POSTGRESQL_VERSION=11
BUNDLE_DISABLE_EXEC_LOAD=true
- POSTGRESQL_VERSION=12
BUNDLE_DISABLE_EXEC_LOAD=true
rvm:
- 2.3.0
- 2.4.0
- 2.5.0
- 2.6.0
gemfile:
- gemfiles/rails_5.0.gemfile
- gemfiles/rails_5.1.gemfile
- gemfiles/rails_5.2.gemfile
- gemfiles/rails_6.0.gemfile
matrix:
exclude:
- rvm: 2.3.0
gemfile: gemfiles/rails_6.0.gemfile
- rvm: 2.4.0
gemfile: gemfiles/rails_6.0.gemfile
before_install:
- wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
- echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list
- sudo apt update
- sudo apt install -yq --no-install-suggests --no-install-recommends postgresql-${POSTGRESQL_VERSION}
- sudo sed -ri 's/^port.*/port = 5432/' /etc/postgresql/${POSTGRESQL_VERSION}/main/postgresql.conf
- sudo sed -ri 's/peer/trust/' /etc/postgresql/${POSTGRESQL_VERSION}/main/pg_hba.conf
- sudo /etc/init.d/postgresql stop
- sudo systemctl start postgresql@${POSTGRESQL_VERSION}-main.service || (systemctl status postgresql.service; sudo journalctl -xe; exit 1)
- pg_lsclusters -h
- /usr/lib/postgresql/${POSTGRESQL_VERSION}/bin/psql -U postgres -c 'SHOW server_version;'
- /usr/lib/postgresql/${POSTGRESQL_VERSION}/bin/psql -U postgres -c 'SHOW server_version;' | grep -P "(?<"'!'"[0-9.])${POSTGRES_VERSION}"
- /usr/lib/postgresql/${POSTGRESQL_VERSION}/bin/psql -U postgres -c "SELECT * FROM pg_catalog.pg_roles where rolname = 'travis'" | grep travis || /usr/lib/postgresql/${POSTGRESQL_VERSION}/bin/psql -U postgres -c 'CREATE ROLE travis SUPERUSER LOGIN CREATEDB'
- gem install --force bundler -v 1.17.3
script:
- bundle _1.17.3_ exec rubocop
- sh -c 'cd spec/dummy && bundle _1.17.3_ exec bin/rake db:reset'
- sh -c 'cd spec/dummy && bundle _1.17.3_ exec bin/rake parallel:create[3]'
- bundle _1.17.3_ exec rspec