Move before_script and script to files

This commit is contained in:
Zach Borboa
2014-07-24 10:39:35 -07:00
parent ccd05cbf47
commit 3b6debd09b
3 changed files with 20 additions and 6 deletions
+6 -6
View File
@@ -1,19 +1,19 @@
language: php
php:
- 5.3
- 5.4
- 5.5
- 5.6
- hhvm
matrix:
allow_failures:
- php: 5.6
- php: hhvm
before_script:
- if [[ "$TRAVIS_PHP_VERSION" == "5.4" ]]; then sh -c "php -S 127.0.0.1:8000 -t tests/PHPCurlClass/ &"; fi
- if [[ "$TRAVIS_PHP_VERSION" == "5.5" ]]; then sh -c "php -S 127.0.0.1:8000 -t tests/PHPCurlClass/ &"; fi
- if [[ "$TRAVIS_PHP_VERSION" == "5.6" ]]; then sh -c "php -S 127.0.0.1:8000 -t tests/PHPCurlClass/ &"; fi
- if [[ "$TRAVIS_PHP_VERSION" == "hhvm" ]]; then sh -c "cd tests && hhvm --mode server --port 8000 --config PHPCurlClass/server.hdf &"; fi
- bash tests/before_script.sh
script:
- find . -type "f" -iname "*.php" | xargs -L "1" php -l
- if [[ "$TRAVIS_PHP_VERSION" != "5.3" ]]; then sh -c "cd tests && phpunit --configuration phpunit.xml"; fi
- bash tests/script.sh
+9
View File
@@ -0,0 +1,9 @@
if [[ "${TRAVIS_PHP_VERSION}" == "5.4" ]]; then
php -S 127.0.0.1:8000 -t tests/PHPCurlClass/ &
elif [[ "${TRAVIS_PHP_VERSION}" == "5.5" ]]; then
php -S 127.0.0.1:8000 -t tests/PHPCurlClass/ &
elif [[ "${TRAVIS_PHP_VERSION}" == "5.6" ]]; then
php -S 127.0.0.1:8000 -t tests/PHPCurlClass/ &
elif [[ "${TRAVIS_PHP_VERSION}" == "hhvm" ]]; then
cd tests && hhvm --mode server --port 8000 --config PHPCurlClass/server.hdf &
fi
+5
View File
@@ -0,0 +1,5 @@
find . -type "f" -iname "*.php" | xargs -L "1" php -l
if [[ "${TRAVIS_PHP_VERSION}" != "5.3" ]]; then
cd tests && phpunit --configuration phpunit.xml
fi