-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
62 lines (51 loc) · 1.83 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
language: php
php:
- 5.6
- 7.0
- 7.1
- nightly
- hhvm
sudo: false
matrix:
allow_failures:
- php: 5.3
- php: 5.4
- php: 5.5
- php: nightly
fast_finish: true
before_install:
- composer self-update --no-interaction
- composer --version --no-interaction
env:
- PREFER_LOWEST="--prefer-lowest"
- PREFER_LOWEST=""
before_script:
- composer update --ignore-platform-reqs --prefer-dist $PREFER_LOWEST
- composer --optimize-autoloader --no-interaction
script:
- bin/phpunit --configuration . --coverage-clover=build/logs/clover.xml --coverage-html=build/html/coverage
after_script:
- if [ $(phpenv version-name) == "5.6" ] && [ "$PREFER_LOWEST" == "--prefer-lowest" ]; then bin/codacycoverage clover build/logs/clover.xml > /dev/null 2>&1; fi
after_success:
# Push coverage to github pages branch
- chmod +x ./update-gh-pages.sh
- if [ $(phpenv version-name) == "5.6" ] && [ "$PREFER_LOWEST" == "--prefer-lowest" ]; then bash ./update-gh-pages.sh; fi
# CREATE GIT TAG
- git config --global user.email "builds@travis-ci.org"
- git config --global user.name "Travis"
- export GIT_TAG=build-$TRAVIS_BRANCH-$(date -u "+%Y-%m-%d")-$TRAVIS_BUILD_NUMBER
- echo -n $GIT_TAG > public/version
- git commit -m "Set build VERSION number" public/version
- git tag $GIT_TAG -a -m "Generated tag from TravisCI build $TRAVIS_BUILD_NUMBER"
- git push --tags --quiet https://$GITHUBKEY@github.com/clickalicious/rng > /dev/null 2>&1
# Blacklist the pushed tag from above to prevent black hole
branches:
except:
- /^build-[0-9a-z\-]*/
# Who to notify?
notifications:
slack:
secure: fNU5MckS6fgDKhMeFPC0D0Qj7anIHQP7DlPf+WzDePbC7QXZWMiIR9QGY5T5VKxuezwVQZVZzUAYdlBSJE0WN18v3S2ulxvY1ZuWK9NeGsA5giuBVaamHlQzBkFqHk5i9L0hJ0WAsoPp4RqLzWp/y+w8fBxeNEywEttEqMk5Wx4=
email:
recipients:
- opensource@clickalicious.de