-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
55 lines (43 loc) · 1.26 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
language: php
dist: trusty
sudo: false
cache:
directories:
- $HOME/.composer/cache
env:
matrix:
- DB=mysql db_dsn='mysql://[email protected]/cakephp_test'
global:
- DEFAULT=1
matrix:
fast_finish: true
allow_failures:
- php: 7.3
- php: nightly
include:
- php: 7.1
env: PHPCS=1 COVERAGE=1 PHPSTAN=0
- php: 7.2
env: PHPCS=1 COVERAGE=0 PHPSTAN=0
- php: 7.3
env: PHPCS=1 COVERAGE=0 PHPSTAN=0
- php: nightly
env: PHPCS=1 COVERAGE=0 PHPSTAN=0
install:
- composer validate --strict
- composer install --no-interaction --no-progress --no-suggest
- mkdir -p build/test-coverage build/test-results
before_script:
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'CREATE DATABASE IF NOT EXISTS cakephp_test DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci;'; fi"
script:
- if [[ $PHPCS = 1 ]]; then ./vendor/bin/phpcs; fi
- if [[ $COVERAGE = 0 ]]; then ./vendor/bin/phpunit --no-coverage; fi
- if [[ $COVERAGE = 1 ]]; then ./vendor/bin/phpunit; fi
- if [[ $PHPSTAN = 1 ]]; then ./vendor/bin/phpstan analyse; fi
after_success:
- curl -s https://codecov.io/bash > /tmp/codecov.sh
- chmod +x /tmp/codecov.sh
- /tmp/codecov.sh -s build/test-results
notifications:
email: