Files
php-curl-class/tests/run.sh
T
Zach Borboa 8259795c46 Fix CI tests (psalm) (#913)
* Display psalm version being run

* Update exclusions

* Use separate configuration for PHP 7.4

* Remove temporary workaround
2025-01-26 19:22:36 -05:00

43 lines
1.0 KiB
Bash
Executable File

#!/usr/bin/env bash
set -x
if [[ "${CI}" == "true" ]]; then
composer self-update
composer install --prefer-source --no-interaction
fi
# Use composer's phpunit and phpcs by adding composer bin directory to the path environment variable.
export PATH="${PWD}/vendor/bin:${PATH}"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
cd "${SCRIPT_DIR}"
source "set_vars.inc.sh"
echo "CI_PHP_VERSION: ${CI_PHP_VERSION}"
echo "CI_PHP_FUTURE_RELEASE: ${CI_PHP_FUTURE_RELEASE}"
php -r "var_dump(phpversion());"
php -r "var_dump(curl_version());"
errors=()
source "run_syntax_check.sh"
source "run_coding_standards_check.sh"
source "run_phpunit.sh"
source "run_static_analysis_check_phpstan.sh"
source "run_static_analysis_check_psalm.sh"
source "display_errors.inc.sh"
if [[ "${CI_PHP_FUTURE_RELEASE}" != "true" ]]; then
exit "${#errors[@]}"
elif [[ "${#errors[@]}" -ne 0 ]]; then
echo "One or more tests failed, but allowed as the CI_PHP_FUTURE_RELEASE flag is on for PHP version ${CI_PHP_VERSION}."
fi