[travis] fix CI
This commit is contained in:
parent
6723e60540
commit
a0961d3b99
15
.travis.yml
15
.travis.yml
@ -234,7 +234,7 @@ install:
|
|||||||
SYMFONY_VERSION=$(git ls-remote --heads | grep -o '/[1-9].*' | tail -n 1 | sed s/.//) &&
|
SYMFONY_VERSION=$(git ls-remote --heads | grep -o '/[1-9].*' | tail -n 1 | sed s/.//) &&
|
||||||
git fetch --depth=2 origin $SYMFONY_VERSION &&
|
git fetch --depth=2 origin $SYMFONY_VERSION &&
|
||||||
git checkout -m FETCH_HEAD &&
|
git checkout -m FETCH_HEAD &&
|
||||||
COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n' | sort)
|
export COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -printf '%h\n' | sort)
|
||||||
else
|
else
|
||||||
SYMFONY_VERSION=$(cat composer.json | grep '^ *"dev-master". *"[1-9]' | grep -o '[0-9.]*')
|
SYMFONY_VERSION=$(cat composer.json | grep '^ *"dev-master". *"[1-9]' | grep -o '[0-9.]*')
|
||||||
fi
|
fi
|
||||||
@ -242,7 +242,7 @@ install:
|
|||||||
- |
|
- |
|
||||||
# Skip the phpunit-bridge on not-master branches when $deps is empty
|
# Skip the phpunit-bridge on not-master branches when $deps is empty
|
||||||
if [[ ! $deps && $TRAVIS_BRANCH != master ]]; then
|
if [[ ! $deps && $TRAVIS_BRANCH != master ]]; then
|
||||||
COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -not -wholename '*/Bridge/PhpUnit/*' -printf '%h\n' | sort)
|
export COMPONENTS=$(find src/Symfony -mindepth 3 -type f -name phpunit.xml.dist -not -wholename '*/Bridge/PhpUnit/*' -printf '%h\n' | sort)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- |
|
- |
|
||||||
@ -256,7 +256,7 @@ install:
|
|||||||
|
|
||||||
- |
|
- |
|
||||||
# Legacy tests are skipped when deps=high and when the current branch version has not the same major version number as the next one
|
# Legacy tests are skipped when deps=high and when the current branch version has not the same major version number as the next one
|
||||||
[[ $deps = high && ${SYMFONY_VERSION%.*} != $(git show $(git ls-remote --heads | grep -FA1 /$SYMFONY_VERSION | tail -n 1):composer.json | grep '^ *"dev-master". *"[1-9]' | grep -o '[0-9]*' | head -n 1) ]] && LEGACY=,legacy
|
[[ $deps = high && ${SYMFONY_VERSION%.*} != $(git show $(git ls-remote --heads | grep -FA1 /$SYMFONY_VERSION | tail -n 1):composer.json | grep '^ *"dev-master". *"[1-9]' | grep -o '[0-9]*' | head -n 1) ]] && export LEGACY=,legacy
|
||||||
|
|
||||||
export COMPOSER_ROOT_VERSION=$SYMFONY_VERSION.x-dev
|
export COMPOSER_ROOT_VERSION=$SYMFONY_VERSION.x-dev
|
||||||
if [[ $deps ]]; then mv composer.json.phpunit composer.json; fi
|
if [[ $deps ]]; then mv composer.json.phpunit composer.json; fi
|
||||||
@ -271,7 +271,7 @@ install:
|
|||||||
export PHP=$1
|
export PHP=$1
|
||||||
if [[ $PHP != $TRAVIS_PHP_VERSION && $TRAVIS_PULL_REQUEST != false ]]; then
|
if [[ $PHP != $TRAVIS_PHP_VERSION && $TRAVIS_PULL_REQUEST != false ]]; then
|
||||||
echo -e "\\n\\e[33;1mIntermediate PHP version $PHP is skipped for pull requests.\\e[0m"
|
echo -e "\\n\\e[33;1mIntermediate PHP version $PHP is skipped for pull requests.\\e[0m"
|
||||||
break
|
return
|
||||||
fi
|
fi
|
||||||
phpenv global ${PHP/hhvm*/hhvm}
|
phpenv global ${PHP/hhvm*/hhvm}
|
||||||
if [[ $PHP = 7.* ]]; then
|
if [[ $PHP = 7.* ]]; then
|
||||||
@ -303,10 +303,7 @@ install:
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
export -f run_tests
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- for PHP in $TRAVIS_PHP_VERSION $php_extra; do
|
echo $TRAVIS_PHP_VERSION $php_extra | xargs -n1 bash -c '(</dev/tty run_tests $0)' || false
|
||||||
(run_tests $PHP) || X=1;
|
|
||||||
done
|
|
||||||
|
|
||||||
[[ ! $X ]] || (exit 1)
|
|
||||||
|
Reference in New Issue
Block a user