forked from pact-foundation/pact_broker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
31 lines (31 loc) · 1.25 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
language: ruby
rvm:
# Only supporting 2.4 until we upgrade the DiUS pact broker base image
- 2.4.1
- 2.5
services:
- postgresql
- mysql
addons:
postgresql: "9.5"
env:
global:
- CC_TEST_REPORTER_ID=dc2c30b67c9e2a5309e1aef699c30fdab55ba4f0e4f1beac029ba93e293835db
- GIT_COMMITTED_AT=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then git log -1 --pretty=format:%ct; else git log -1 --skip 1 --pretty=format:%ct; fi)
matrix:
- DATABASE_ADAPTER=default RUBYOPT="-W0"
- DATABASE_ADAPTER=postgres RUBYOPT="-W0" INSTALL_PG=true
- DATABASE_ADAPTER=mysql RUBYOPT="-W0" INSTALL_MYSQL=true
before_script:
- cp config/database.travis.yml config/database.yml
- psql -U postgres -c "CREATE DATABASE pact_broker;"
- mysql -e 'CREATE DATABASE pact_broker;'
- mysql -e "GRANT ALL ON pact_broker.* TO 'travis'@'%';"
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
before_install:
- bundle config set without 'development'
script:
- bundle exec rake
- if [ "$DATABASE_ADAPTER" == "postgres" ]; then ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT || true; fi
# - if [ ! -z "$(ruby --version | grep '2\.4\.')" ]; then ./script/db-spec.sh; fi