#!/bin/sh
#
# This file is part of the Zephir.
#
# (c) Zephir Team <team@zephir-lang.com>
#
# For the full copyright and license information, please view
# the LICENSE file that was distributed with this source code.

# -e  Exit immediately if a command exits with a non-zero status.
# -u  Treat unset variables as an error when substituting.
set -eu

if [ "$($(phpenv which php-config) --vernum)" -lt "70200" ]; then
  test_suite="Extension_Php70"
else
  test_suite="Extension_Php72"
fi

"$(phpenv which php)" \
  -d extension=ext/modules/test.so \
  vendor/bin/simple-phpunit \
  --colors=always \
  --bootstrap unit-tests/ext-bootstrap.php \
  --testsuite ${test_suite} \
  --coverage-clover "./unit-tests/output/coverage-${test_suite}.xml"

"$(phpenv which php)" \
  vendor/bin/simple-phpunit \
  --colors=always \
  --testsuite Zephir \
  --coverage-clover ./unit-tests/output/coverage-Zephir.xml

#!/bin/sh
#
# This file is part of the Zephir.
#
# (c) Zephir Team <team@zephir-lang.com>
#
# For the full copyright and license information, please view
# the LICENSE file that was distributed with this source code.

# -e  Exit immediately if a command exits with a non-zero status.
# -u  Treat unset variables as an error when substituting.
set -eu

if [ "$($(phpenv which php-config) --vernum)" -lt "70200" ]; then
  test_suite="Extension_Php70"
else
  test_suite="Extension_Php72"
fi

"$(phpenv which php)" \
  -d extension=ext/modules/test.so \
  vendor/bin/simple-phpunit \
  --colors=always \
  --bootstrap unit-tests/ext-bootstrap.php \
  --testsuite ${test_suite} \
  --coverage-clover "./unit-tests/output/coverage-${test_suite}.xml"

"$(phpenv which php)" \
  vendor/bin/simple-phpunit \
  --colors=always \
  --testsuite Zephir \
  --coverage-clover ./unit-tests/output/coverage-Zephir.xml

exit $?

Fix travis exit status for failed steps
Fix travis exit status for failed steps
