File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ before_install:
1818
1919install :
2020 - composer install --no-interaction
21+ - ./ci/test-env-install.sh
2122
2223before_script :
2324 - composer validate
Original file line number Diff line number Diff line change 1+ function setup_test_requirements() {
2+ # Adding software-properties-common for add-apt-repository.
3+ apt-get install -y software-properties-common
4+ # Adding ondrej/php repository for installing php, this works for all ubuntu flavours.
5+ add-apt-repository -y ppa:ondrej/php
6+ apt-get update
7+ # Installing php-cli, which is the minimum requirement to run EasyEngine
8+ apt-get -y install php7.2-cli
9+
10+ php_modules=( pcntl curl sqlite3 )
11+ if command -v php > /dev/null 2>&1 ; then
12+ # Reading the php version.
13+ default_php_version=" $( readlink -f /usr/bin/php | gawk -F " php" ' { print $2}' ) "
14+ for module in " ${php_modules[@]} " ; do
15+ if ! php -m | grep $module >> $LOG_FILE 2>&1 ; then
16+ echo " $module not installed. Installing..."
17+ apt install -y php$default_php_version -$module
18+ else
19+ echo " $module is already installed"
20+ fi
21+ done
22+ fi
23+ }
24+
25+ setup_test_requirements
You can’t perform that action at this time.
0 commit comments