diff --git a/.travis.yml b/.travis.yml index 9c9202a25c..05f516f24d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -20,7 +20,6 @@ sudo: false env: matrix: - CI_MODE=test - - CI_MODE=lint global: - TESTSUITE_USER=root - TESTSUITE_PASSWORD=root @@ -28,7 +27,7 @@ env: install: - ./test/ci-install-$CI_MODE - - if [ $TRAVIS_PHP_VERSION != "hhvm" ] ; then phpenv config-add test/php-noprofile.ini ; fi + - if [[ "$TRAVIS_OS_NAME" != "osx" ]]; then case "$TRAVIS_PHP_VERSION" in hhvm*) ;; *) phpenv config-add test/php-noprofile.ini ;; esac ; fi before_script: - export PATH=~/.composer/vendor/bin/:$PATH @@ -38,7 +37,8 @@ before_script: - ./test/start-local-server script: - - ant clean + - ./scripts/generate-mo --quiet + - if [ $CI_MODE = test ] ; then ./test/ci-lint ; fi - ./test/ci-$CI_MODE after_script: @@ -67,22 +67,23 @@ matrix: before_install: - brew tap homebrew/php - brew update - - brew install ant gettext php70 mariadb + - brew install gettext php70 mariadb - brew link --force gettext - curl https://getcomposer.org/installer | php - ln -s "`pwd`/composer.phar" /usr/local/bin/composer - mysql.server start cache: + pip: true directories: - $HOME/.composer/cache/ - $HOME/browserstack - $HOME/runkit - - $HOME/.cache/pip +# Install APT packages +# - git > 2.5.1 needed for worktrees addons: apt: packages: - git - - python-coverage sources: - git-core diff --git a/phpunit.xml.dist b/phpunit.xml.dist index ab6d82156b..959ac0e46d 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -47,8 +47,6 @@ test/ examples - - scripts diff --git a/test/ci-install-docs b/test/ci-install-docs index 624e0084f1..02f74a0b54 100755 --- a/test/ci-install-docs +++ b/test/ci-install-docs @@ -2,5 +2,5 @@ # We use 1.5 to be able to deal with gzip only sites in linkcheck (such as tcpdf.org) -pip install --user 'Sphinx>=1.5a2' 'requests[security]' - +pip install --user --upgrade pip wheel +~/.local/bin/pip install --user 'Sphinx' 'requests[security]' diff --git a/test/ci-install-release b/test/ci-install-release index f6cecab51a..32cccf2b6a 100755 --- a/test/ci-install-release +++ b/test/ci-install-release @@ -1,3 +1,3 @@ #!/bin/sh -pip install --user Sphinx +./test/ci-install-docs diff --git a/test/ci-lint b/test/ci-lint index 57ab51661f..12ee34618a 100755 --- a/test/ci-lint +++ b/test/ci-lint @@ -1,4 +1,7 @@ #!/bin/sh -ant locales lint - +if [ -z "$TRAVIS_COMMIT_RANGE" ] ; then + find . -name '*.php' -not -path './vendor/*' | xargs -n1 -r php -l +else + git diff --name-only $TRAVIS_COMMIT_RANGE -- '*.php' | xargs -n1 -r php -l +fi diff --git a/test/ci-selenium b/test/ci-selenium index 0c05b3fdf1..d5d6b91dfb 100755 --- a/test/ci-selenium +++ b/test/ci-selenium @@ -1,7 +1,3 @@ #!/bin/sh -ant locales - -export PHPUNIT_ARGS="--group selenium --debug" - -ant phpunit-nocoverage +./vendor/bin/phpunit --configuration phpunit.xml.nocoverage --group selenium --debug diff --git a/test/ci-test b/test/ci-test index da8bd65c60..1bd4497897 100755 --- a/test/ci-test +++ b/test/ci-test @@ -1,11 +1,12 @@ #!/bin/sh -ant locales +case "$TRAVIS_PHP_VERSION" in + hhvm*) + CONFIG=phpunit.xml.hhvm + ;; + *) + CONFIG=phpunit.xml.dist + ;; +esac -export PHPUNIT_ARGS="--exclude-group selenium" - -if [ "$TRAVIS_PHP_VERSION" = "hhvm" ] ; then - ant phpunit-hhvm -else - ant phpunit -fi +./vendor/bin/phpunit --configuration $CONFIG --exclude-group selenium diff --git a/test/install-runkit b/test/install-runkit index 180d4ca139..fdd8409b5b 100755 --- a/test/install-runkit +++ b/test/install-runkit @@ -6,9 +6,12 @@ if [ -n "$GATEWAY_INTERFACE" ] ; then exit 1 fi -if [ "$TRAVIS_PHP_VERSION" = "nightly" -o "$TRAVIS_PHP_VERSION" = "hhvm" -o "$TRAVIS_PHP_VERSION" = "7.0" -o "$TRAVIS_PHP_VERSION" = "7.1" -o "$TRAVIS_OS_NAME" = "osx" ] ; then - exit 0 -fi +# These do not support runkit +case "$TRAVIS_PHP_VERSION" in + hhvm*|7.0|7.1|nightly) + exit 0 + ;; +esac set -e set -x