Skip to content

Commit eb20a4d

Browse files
author
Afrimadoni Dinata
committed
fix travis script
1 parent 9ad4647 commit eb20a4d

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.travis.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Use ubuntu trusty
2+
dist: trusty
3+
sudo: false
4+
5+
# build only master branch
6+
branches:
7+
only:
8+
- master
9+
10+
# Test Matrix
11+
language: php
12+
env:
13+
- DEFAULT_COMPOSER_FLAG="--prefer-dist --no-interaction --no-progress --optimize-autoloader"
14+
15+
cache:
16+
directories:
17+
- vendor
18+
- $HOME/.composer/cache
19+
php:
20+
- 5.6
21+
- 7.1
22+
install:
23+
- travis_retry composer self-update
24+
# publish composer vendor binary
25+
- export PATH="$HOME/.composer/vendor/bin:$PATH"
26+
# install composer dependency
27+
- travis_retry composer install ${DEFAULT_COMPOSER_FLAG}
28+
before_script:
29+
# show php version
30+
- php --version
31+
# show composer version
32+
- composer --version
33+
script:
34+
- ./vendor/bin/phpunit --coverage-clover=coverage.xml
35+
36+
# if test success then upload code coverage to codecov
37+
after_success:
38+
- bash <(curl -s https://codecov.io/bash)

0 commit comments

Comments
 (0)