This repository has been archived by the owner on Dec 28, 2019. It is now read-only.
forked from fico7489/laravel-eloquent-join
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
65 lines (56 loc) · 1.97 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
57
58
59
60
61
62
63
64
65
language: php
sudo: false
services:
- mysql
addons:
apt:
sources:
- mysql-5.7-trusty
packages:
- mysql-server
- mysql-client
- libxml2-utils
php:
- 7.1
- 7.2
matrix:
allow_failures:
- php: master
fast_finish: true
env:
matrix:
- LARAVEL_VERSION=5.5.*
- LARAVEL_VERSION=5.6.*
- LARAVEL_VERSION=5.7.*
- LARAVEL_VERSION=5.8.*
- LARAVEL_VERSION=6.0.*
global:
- DEFAULT_COMPOSER_FLAGS="--no-interaction --no-ansi --no-progress --no-suggest"
install:
- mysql_upgrade -u root
- mysql -h localhost -e "CREATE DATABASE homestead;"
- mysql -h localhost -e "GRANT USAGE ON *.* TO homestead@localhost IDENTIFIED BY 'secret';"
- mysql -h localhost -e "GRANT ALL PRIVILEGES ON homestead.* TO homestead@localhost;"
- mysql -h localhost -e "FLUSH PRIVILEGES;"
- composer clear-cache
- if [ "$LARAVEL_VERSION" != "" ]; then composer require --dev "laravel/framework:${LARAVEL_VERSION}" --no-update; fi;
- travis_retry composer update $DEFAULT_COMPOSER_FLAGS
- cp .env.example .env
- echo 'zend.assertions=1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
- echo 'assert.exception=On' >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini
script:
- mysql -h localhost -e "SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));"
- ./vendor/bin/phpunit --coverage-text --coverage-clover=build/logs/clover.xml
- ./vendor/bin/phpunit --configuration ./build/travis-ci-fail.xml > /dev/null; if [ $? -eq 0 ]; then echo "SHOULD FAIL"; false; else echo "fail checked"; fi;
jobs:
include:
- stage: Style
php: 7.2
env: php-cs-fixer
install:
- composer require --dev friendsofphp/php-cs-fixer
- phpenv config-rm xdebug.ini
- travis_retry composer update --prefer-dist --prefer-stable
script:
- ./vendor/bin/php-cs-fixer --diff --dry-run -v fix src
- ./vendor/bin/php-cs-fixer --diff --dry-run -v fix tests