forked from chobie/jira-api-restclient
-
Notifications
You must be signed in to change notification settings - Fork 3
/
.travis.yml
38 lines (30 loc) · 937 Bytes
/
.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
language: php
sudo: false
cache:
directories:
- $HOME/.composer/cache
php:
- 5.4
- 5.5
- 5.6
- 7.0
- 7.1
- 7.2
matrix:
include:
- php: 5.3
dist: precise
install:
- if [ "$TRAVIS_PHP_VERSION" = "5.5" ]; then composer require "phpunit/phpunit:^4.8" --dev; fi;
- if [ "$TRAVIS_PHP_VERSION" != "5.5" ]; then composer install --prefer-dist; fi;
before_script:
- WEBSERVER_PHP_VERSION="5.6"
- if [ ! -d "$HOME/.phpenv/versions/5.6" ]; then WEBSERVER_PHP_VERSION="5.4"; fi;
- ~/.phpenv/versions/${WEBSERVER_PHP_VERSION}/bin/php -S localhost:8000 -t $(pwd) > /dev/null 2> /tmp/webserver_output.txt &
- export REPO_URL=http://localhost:8000/
- while ! curl $REPO_URL >/dev/null 2>&1; do sleep 1; done
script:
- if [ "$TRAVIS_PHP_VERSION" = "5.5" ]; then ./vendor/bin/phpunit; fi;
- if [ "$TRAVIS_PHP_VERSION" != "5.5" ]; then phpunit; fi;
after_failure:
- cat /tmp/webserver_output.txt