forked from nojimage/cakephp-oauth-server
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.travis.yml
61 lines (46 loc) · 1.45 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
language: php
services:
- mysql
php:
- 7.1
- 7.2
- 7.3
sudo: false
env:
matrix:
- CAKE_VERSION='3.7.*'
- CAKE_VERSION='3.8.*'
global:
- DEFAULT=1 DB=sqlite db_dsn='sqlite:///:memory:'
cache:
directories:
- vendor
- $HOME/.composer/cache
matrix:
fast_finish: true
include:
- php: 7.1
env: CAKE_VERSION='3.5.*' DEFAULT=1 DB=sqlite db_dsn='sqlite:///:memory:'
- php: 7.1
env: DEFAULT=1 DB=mysql db_dsn='mysql://[email protected]/cakephp_test'
- php: 7.1
env: PHPCS=1 DEFAULT=0
- php: 7.1
env: CODECOVERAGE=1 DEFAULT=0
install:
- composer self-update
- if [ ! -z ${CAKE_VERSION} ]; then composer require cakephp/cakephp:${CAKE_VERSION}; fi
- composer install --prefer-dist --no-interaction
before_script:
- if [ $DB = 'mysql' ]; then mysql -u root -e 'CREATE DATABASE cakephp_test CHARACTER SET utf8 COLLATE utf8_general_ci;'; fi
- phpenv rehash
- set +H
- chmod 0600 tests/Fixture/*.pem
script:
- sh -c "if [ '$DEFAULT' = '1' ]; then vendor/bin/phpunit; fi"
- sh -c "if [ '$PHPCS' = '1' ]; then vendor/bin/phpcs -p --extensions=php --standard=vendor/cakephp/cakephp-codesniffer/CakePHP --ignore=config/Migrations/* ./src ./tests ./config; fi"
- sh -c "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