-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
52 lines (40 loc) · 1.44 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
#This Travis config template file was taken from https://github.com/FriendsOfCake/travis
language: php
php:
- 5.6
- 7.0
- 7.1
- 7.2
sudo: false
env:
matrix:
- CAKE_VERSION='3.5.*' DB=mysql db_dsn='mysql://[email protected]/cakephp_test'
- CAKE_VERSION='3.6.*' DB=mysql db_dsn='mysql://[email protected]/cakephp_test'
global:
- DEFAULT=1
cache:
directories:
- $HOME/.composer/cache
matrix:
fast_finish: true
include:
- php: 7.2
env: PHPCS=1 DEFAULT=0
- php: 7.2
env: CODECOVERAGE=1 DEFAULT=0 DB=mysql db_dsn='mysql://[email protected]/cakephp_test'
install:
- if [ $HHVM != '1' ]; then phpenv config-rm xdebug.ini; fi
- composer self-update
- if [ ! -z ${CAKE_VERSION} ]; then composer require cakephp/cakephp:${CAKE_VERSION} --prefer-source; fi
- composer install --prefer-source --no-interaction
before_script:
- if [ $DB = 'mysql' ]; then mysql -u root -e 'CREATE DATABASE cakephp_test;'; fi
- if [ $PHPCS = '1' ]; then composer require cakephp/cakephp-codesniffer:dev-master; fi
script:
- if [ $DEFAULT = '1' ]; then vendor/bin/phpunit --stderr; fi
- if [ $PHPCS = '1' ]; then vendor/bin/phpcs -p --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests; fi
- if [ $CODECOVERAGE = '1' ]; then vendor/bin/phpunit --stderr --coverage-clover=coverage.xml; fi
after_success:
- if [[ $CODECOVERAGE = 1 ]]; then bash <(curl -s https://codecov.io/bash); fi
notifications:
email: false