-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy path.travis.yml
38 lines (28 loc) · 860 Bytes
/
.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
language: php
php:
- 7.1
sudo: false
env:
matrix:
- DB=mysql db_dsn='mysql://[email protected]/cakephp_test'
global:
- RUN_TESTS=1
matrix:
fast_finish: true
include:
- php: 7.1
env: RUN_CS=1 RUN_TESTS=0
- php: 7.1
env: RUN_TESTS=0 DB=mysql db_dsn='mysql://[email protected]/cakephp_test'
before_script:
- composer self-update
- composer install --no-interaction --prefer-dist
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE cakephp_test;'; fi"
- sh -c "if [ '$RUN_CS' = '1' ]; then composer require squizlabs/php_codesniffer; fi"
- phpenv rehash
- set +H
script:
- sh -c "if [ '$RUN_TESTS' = '1' ]; then phpunit --stderr; fi"
- sh -c "if [ '$RUN_CS' = '1' ]; then ./vendor/bin/phpcs --standard=vendor/cakephp/cakephp-codesniffer/CakePHP ./src ./tests; fi"
notifications:
email: false