-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
74 lines (55 loc) · 1.63 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
64
65
66
67
68
69
70
71
72
73
74
# Config file for https://travis-ci.org/
# Validate this file here - http://lint.travis-ci.org/
# Tell Travis CI we are using PHP
language: php
# The platforms you wants to test on
os:
- linux
# git configs
git:
depth: 1
# Define the php versions against we want to test our code
php:
- 7.1
- 7.2
- nightly
matrix:
fast_finish: true
# We don't want to run linux commands as super user
sudo: false
# Note: Code coverage requires php Xdebug extension to enabled
# Composer package installation
install:
# Install composer packages, will also trigger dump-autoload
- travis_retry composer install --no-interaction
# Install coveralls.phar
- wget -c -nc --retry-connrefused --tries=0 https://github.com/satooshi/php-coveralls/releases/download/v1.0.1/coveralls.phar
- chmod +x coveralls.phar
- php coveralls.phar --version
# Create a storage folder for Coverage report
before_script:
- mkdir -p build/logs
- ls -al
# Testing the app (see phpunit.xml), generating Code Coverage report
script:
- ./vendor/bin/phpunit -c tests/phpunit.xml --coverage-clover build/logs/clover.xml
#after_script:
after_success:
# Submit coverage report to Coveralls servers, see .coveralls.yml
- travis_retry php coveralls.phar -v
# Submit coverage report to codecov.io
# - bash <(curl -s https://codecov.io/bash)
#after_failure:
# Tell Travis CI to monitor only 'master' branch
branches:
only: master
# Configure email notifications
notifications:
email:
on_success: never
on_failure: always
# You can delete cache using travis-ci web interface
cache:
directories:
- vendor
- $HOME/.cache/composer