forked from rappasoft/laravel-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
63 lines (53 loc) · 2.54 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
git:
submodules: false
language: php
cache:
directories:
- vendor
- $HOME/.composer/cache
php:
- 5.6
- 7.0
- 7.1
matrix:
fast_finish: true
include:
- php: 7.0.12 # for coverage
env: DB_CONNECTION=mysql DB_DATABASE=boilerplate_test DB_USERNAME=root DB_PASSWORD='' DB_PORT=3306 EXEC_COVERAGE=true
sudo: required
dist: trusty
exclude:
- php: 5.6
env: DB_CONNECTION=mysql DB_DATABASE=boilerplate_test DB_USERNAME=root DB_PASSWORD='' DB_PORT=3306 EXEC_COVERAGE=true
- php: 7.0
env: DB_CONNECTION=mysql DB_DATABASE=boilerplate_test DB_USERNAME=root DB_PASSWORD='' DB_PORT=3306 EXEC_COVERAGE=true
- php: 7.1
env: DB_CONNECTION=mysql DB_DATABASE=boilerplate_test DB_USERNAME=root DB_PASSWORD='' DB_PORT=3306 EXEC_COVERAGE=true
allow_failures:
- env: DB_DATABASE=sqlite
- php: 7.0.12 # dist: trusty A dummy to run trusty, the test is not actually executed
env: DB_CONNECTION=mysql DB_DATABASE=boilerplate_test DB_USERNAME=root DB_PASSWORD='' DB_PORT=3306 EXEC_COVERAGE=true
before_install:
- if [[ "$DB_CONNECTION" == "pgsql" ]]; then psql -c "DROP DATABASE IF EXISTS boilerplate_test;" -U postgres; fi
- if [[ "$DB_CONNECTION" == "pgsql" ]]; then psql -c "create database boilerplate_test;" -U postgres; fi
- if [[ "$DB_CONNECTION" == "mysql" ]]; then mysql -e "create database IF NOT EXISTS boilerplate_test;" -uroot; fi
env:
- DB_CONNECTION=mysql DB_DATABASE=boilerplate_test DB_USERNAME=root DB_PASSWORD='' DB_PORT=3306
- DB_CONNECTION=pgsql DB_DATABASE=boilerplate_test DB_USERNAME=postgres DB_PASSWORD='' DB_PORT=5432
- DB_CONNECTION=mysql DB_DATABASE=boilerplate_test DB_USERNAME=root DB_PASSWORD='' DB_PORT=3306 EXEC_COVERAGE=true
- DB_DATABASE=sqlite
before_script:
- if [[ $EXEC_COVERAGE != 'true' ]]; then phpenv config-rm xdebug.ini ; fi
- if [[ $EXEC_COVERAGE = 'true' ]]; then echo "memory_limit=-1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/travis.ini ; fi
- composer self-update || true
- composer install --dev --no-interaction -o --no-scripts
- composer run-script post-root-package-install
- composer run-script post-create-project-cmd
- composer run-script post-install-cmd
script:
- if [[ $EXEC_COVERAGE = 'true' ]]; then phpdbg -qrr ./vendor/bin/phpunit --coverage-clover=coverage.clover ; fi
- if [[ $EXEC_COVERAGE != 'true' ]]; then ./vendor/bin/phpunit ; fi
after_success:
- if [[ $EXEC_COVERAGE = 'true' ]]; then php vendor/bin/coveralls -v -x coverage.clover ; fi
after_failure:
- cat storage/logs/laravel-`date +"%Y-%m-%d"`.log