Permalink
Browse files

Fix Travis builds by skipping all IPv6 tests on Travis

  • Loading branch information...
clue committed Mar 8, 2018
1 parent c5e7440 commit 414fabadc4272f1b47cd17dce170858a6422ef08
Showing with 9 additions and 3 deletions.
  1. +3 −0 .travis.yml
  2. +6 −3 tests/acceptance.sh
View
@@ -7,6 +7,9 @@ php:
- 7.0
- 7.1
# lock distro so new future defaults will not break the build
dist: trusty
install:
- composer install
View
@@ -46,17 +46,20 @@ sleep 2
out=$(curl -v --head --silent --fail --proxy http://127.0.0.1:8180 https://www.youtube.com 2>&1) && echo "FAIL: $out" && exit 1 || (echo "$out" | grep -q "504 Gateway Time-out" && echo OK) || (echo "FAIL: $out" && exit 1) || exit 1
# restart LeProxy on IPv6 address
# restart LeProxy on IPv6 address unless we're on Travis (does not support IPv6)
if [ -z "$TRAVIS" ]
then
killall php 2>&- 1>&- || true
php $bin [::]:8180 --no-log &
sleep 2
out=$(curl -v --head --silent --fail --proxy http://[::1]:8180 http://reactphp.org 2>&1) && echo OK || (echo "FAIL: $out" && exit 1) || exit 1
out=$(curl -v --head --silent --fail --proxy http://127.0.0.1:8180 http://reactphp.org 2>&1) && echo OK || (echo "FAIL: $out" && exit 1) || exit 1
[ -n "$TRAVIS" ] || out=$(curl -v --head --silent --fail --proxy http://[::1]:8180 http://[::1]:8180/pac 2>&1) && echo OK || (echo "FAIL: $out" && exit 1) || exit 1
out=$(curl -v --head --silent --fail --proxy http://[::1]:8180 http://[::1]:8180/pac 2>&1) && echo OK || (echo "FAIL: $out" && exit 1) || exit 1
out=$(curl -v --head --silent --fail --proxy socks://[::1]:8180 http://reactphp.org 2>&1) && echo OK || (echo "FAIL: $out" && exit 1) || exit 1
out=$(curl -v --head --silent --fail --proxy socks://127.0.0.1:8180 http://reactphp.org 2>&1) && echo OK || (echo "FAIL: $out" && exit 1) || exit 1
[ -n "$TRAVIS" ] || out=$(curl -v --head --silent --fail --proxy socks5://[::1]:8180 http://[::1]:8180/pac 2>&1) && echo OK || (echo "FAIL: $out" && exit 1) || exit 1
out=$(curl -v --head --silent --fail --proxy socks5://[::1]:8180 http://[::1]:8180/pac 2>&1) && echo OK || (echo "FAIL: $out" && exit 1) || exit 1
fi
# restart LeProxy with hosts and plain HTTP port blocked
killall php 2>&- 1>&- || true

0 comments on commit 414faba

Please sign in to comment.