-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
60 lines (50 loc) · 1.69 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
language: php
php:
- 5.5
- 5.6
- 7.0
- 7.1
- hhvm
# This triggers builds to run on the new TravisCI infrastructure.
# See: http://docs.travis-ci.com/user/workers/container-based-infrastructure/
sudo: false
## Cache composer
cache:
directories:
- $HOME/.composer/cache
- "$HOME/.local"
- mkdocs-theme
env:
global:
- SITE_URL: https://{PACKAGE_VENDOR}.github.io/{PACKAGE_NAME}
- GH_USER_NAME: "{ORGANIZATION}"
- GH_USER_EMAIL: jaap@polderknowledge.nl
- GH_REF: github.com/{PACKAGE_VENDOR}/{PACKAGE_NAME}.git
matrix:
allow_failures:
- php: 5.5
include:
- php: 5.6
env:
- DEPLOY_DOCS="$(if [[ $TRAVIS_BRANCH == 'master' && $TRAVIS_PULL_REQUEST == 'false' ]]; then echo -n 'true' ; else echo -n 'false' ; fi)"
- PATH="$HOME/.local/bin:$PATH"
- php: 5.6
env: 'COMPOSER_FLAGS="--prefer-stable --prefer-lowest"'
before_script:
- travis_retry composer self-update
- travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-dist
script:
- vendor/bin/phpcs --standard=psr2 src/
- vendor/bin/phpunit
- if [[ $DEPLOY_DOCS == "true" && "$TRAVIS_TEST_RESULT" == "0" ]]; then wget -O theme-installer.sh "https://raw.githubusercontent.com/polderknowledge/mkdocs-theme/master/theme-installer.sh" ; chmod 755 theme-installer.sh ; ./theme-installer.sh ; fi
after_script:
- |
if [[ "$TRAVIS_PHP_VERSION" == '5.6' ]]; then
wget https://scrutinizer-ci.com/ocular.phar
php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
fi
after_success:
- if [[ $DEPLOY_DOCS == "true" ]]; then ./mkdocs-theme/deploy.sh ; fi
notifications:
email: false
irc: "irc.freenode.org#polderknowledge"