-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
85 lines (74 loc) · 3.84 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
75
76
77
78
79
80
81
82
83
84
85
sudo: false
language: php
php:
- '5.5'
- '5.6'
- '7.0'
- hhvm
env:
global:
secure: dq7k4I6eXrrmnpstJ8YOBrKp1k1QOQVbF1tN0lQXiXcuoPN9YgZ+0h+KSmf+M2fL9/0y3fXDJN7FO1sxVoglQ1EJbwxpuUjGQdI3PZ5iaiaQa/bWIap2NBbcnSNFg+ZYi1If1AAD8qFcZvjJ5ZVMBKoY+9O38IirhRSSLByyVtMp3xu8Z16ayJjNIRjYw5jp5evJZspe+DCmK7EN8Sg/cjwarTdGbTZ72fI4eZA1WJOTTVGVgWc64s1/Y/G9ZEWw5qtZaRo/jp2Ef6tF+0zSZU+aIKtAuy6+tb7sW9sxRJz/L7IiOm1mlzJPHljCLIOt6dxEiC6KoOaMGI1t3s29hhk/vTIuxKt2aXFrrMN5wRjGbeHE8cfjqnttXDU8kf/YQ3oG4GX1PJfrF1DAdlppSYewA87dhAOEY8WsZWVZYLP+uyR7A9HNXvSOy6KxbFWzda8lpUrCuVwztmel72e82ThxmTru6zMSs3ehau9fQ2omli9AeDswh8YvgeqHY34XYHXTdYMA3iGR4twFOm8fofiHkavObrqJH53f67Iqgc76pBIfWfHsAzTIEK0EJwVRLtmc0sBwj5rQDqgYPCyzzkoDrzxWytz5uvzaSu1PConZT8nv2icCMzcvtNAji7B4iOD5+rwDJ4egChyzi+nvd6dQlFS8yXucHRmUQ1H5axg=
matrix:
fast_finish: true
allow_failures:
- php: hhvm
cache:
directories:
- node_modules
- $HOME/.composer/cache/files
before_install:
- rm -rf "$HOME/.nvm"
- git clone https://github.com/creationix/nvm.git "$HOME/.nvm"
- source "$HOME/.nvm/nvm.sh"
- nvm install node
- npm config set progress false
- npm install -g npm
- |
if [ "$TRAVIS_PULL_REQUEST" = "true" ]; then
phpenv config-rm xdebug.ini
fi
- composer self-update
- composer global require --prefer-source --no-interaction hirak/prestissimo
install:
- npm install
- composer install --prefer-source --no-interaction
script:
- npm run-script lint-ci
- composer test-ci
after_success:
- |
if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then
vendor/bin/coveralls --verbose
fi
- |
if [ "$TRAVIS_PHP_VERSION" = '5.6' ] && [ "$TRAVIS_PULL_REQUEST" = 'false' ]; then
if [ "$TRAVIS_BRANCH" = 'master' ] || [ -n "$TRAVIS_TAG" ]; then
BUILD_PATH="$(pwd)"
REPOSITORY=${REPOSITORY:-"https://${GH_TOKEN}@github.com/$TRAVIS_REPO_SLUG.git"}
BRANCH=${BRANCH:-"gh-pages"}
TAG="$TRAVIS_TAG-gh-pages"
TAG_MESSAGE=$(echo "$TRAVIS_TAG" | sed -e "s/v\([0-9]\+\(.[0-9]\+\)*\)/\1-gh-pages/")
APIGEN_BUILD_PATH=${APIGEN_BUILD_PATH:-"/tmp/apigen"}
GIT_AUTHOR_NAME=${GIT_AUTHOR_NAME:-"Travis CI"}
GIT_AUTHOR_EMAIL=${GIT_AUTHOR_EMAIL:-"travis@travis-ci.org"}
git clone --quiet --branch "$BRANCH" --depth 1 "$REPOSITORY" "$APIGEN_BUILD_PATH" > /dev/null 2>&1
yes | vendor/bin/apigen generate -d "$APIGEN_BUILD_PATH"
cd "$APIGEN_BUILD_PATH" || exit 1
git config user.name "$GIT_AUTHOR_NAME"
git config user.email "$GIT_AUTHOR_EMAIL"
git add -A
git commit -m 'docs: generate API documentation'
if [ -n "$TRAVIS_TAG" ]; then git tag -a "$TAG" -m "$TAG_MESSAGE"; fi
git push --quiet --follow-tags origin "$BRANCH" > /dev/null 2>&1
cd "$BUILD_PATH"
fi
fi
notifications:
email: false
slack:
on_pull_requests: false
on_start: never
on_success: never
on_failure: change
rooms:
- secure: gk/ZLntkbcoLLmxU/VAC4ZH0aPbPnqABENMr/j/ZPruTuESS7tMUKyVDRjGxk3levCRy1ma3I6lJyYFfiNHXwgMVJDN/CATV86nX9L/oLNO6xRooDs2qMlk3dHkWSfWJTOMrXPlsXDI8ft3K/67v90mxjv8wtXRG+/ReYpAJyq8xZEnWvL1AV7ss+Ha1/WyaecdFm4uBhpaRIrQTZaslzABzABbpYVcmi7guz6AX7ifaS/xXD6kLKW710f46Ux3fZmKd4bOs1msMLZugKAyC5y1yVi1lQ6lsvFl+e6GuU7mAmqdereQLxl6QgpeXZJaGX2UUXJF6fli3uBt1Zmf//bPQjvchFlB4fU2M0mlh/dQf1IKBtC8zohM4W0qqcaHq3hHrOkdyls0CEp3LZv/WsHzT486Bxf60JPF0uqb7KHnkKbBEQtZK3UDrJ2eP0fgVGZRuyh1ed9P3xuN/z4liMZQFmc4Q13WR9uohnQdyIgB6WrVCi62SbnZCVvTyWABXKSDeyehxOVSmrfoAmYxbYLc/EF5P+8UeRjWP/NALRlJBI4MKFy/81PDTmLkeLFx/XIePhOXNHez3oEUhwZJHHJKYtnGGfihyeCdzaYxQ6/aCtYb7YdaYI3iU/ofmHN/L1BpXqHIzNt6F7UjS2HoUPQXWgQPWB2sJIweK5diw11I=