forked from tenancy/multi-tenant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
46 lines (38 loc) · 1.46 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
language: php
sudo: true
php:
- 7.0
addons:
hosts:
- system.testing
- tenant.testing
before_install:
# fix ipv6 issue that prevented composer requests and resulted in failing builds
- sudo sh -c "echo 'precedence ::ffff:0:0/96 100' >> /etc/gai.conf"
# updates composer on travis
- travis_retry composer self-update
# clear composer cache, might speed up finding new tags
- travis_retry composer clear-cache
# include prestissimo which speeds up package download
- composer global require hirak/prestissimo
# install beanstalk
- sudo apt-get install -qq --force-yes beanstalkd supervisor
install:
# set the global github token, so connections won't be cancelled
- composer config -g github-oauth.github.com $GITHUB_TOKEN
# create a new database for the hyn connection
- mysql -e "create database hyn;" -uroot
- mysql -e "grant all privileges on *.* to 'travis'@'localhost' with grant option;" -uroot
# create a new laravel project in the subfolder laravel (default composer behaviour)
- composer require laravel/laravel 5.3
# load pheanstalk package to talk with beanstalkd queue
- composer require pda/pheanstalk
# set global variables
- export DB_USERNAME=travis DB_DATABASE=hyn DB_PASSWORD= QUEUE_DRIVER=sync BUILD_DIR=$TRAVIS_BUILD_DIR
script:
# run the script calling unit tests and so on
- ./scripts/travis.sh
after_success:
- bash <(curl -s https://codecov.io/bash)
after_failure:
- cat /var/log/travis-queue.log