version: 0.2 phases: install: commands: - | export DEBIAN_FRONTEND=noninteractive #Install php7.1 apt-get update apt-get install -y software-properties-common LC_ALL=C.UTF-8 add-apt-repository -y ppa:ondrej/php apt-get update # Install PHP apt-get install -y php7.3\ php7.3-ldap \ php7.3-xml \ php7.3-xmlrpc \ php7.3-zip \ php7.3-mysql \ php7.3-mbstring \ php7.3-mcrypt \ php7.3-gd \ php7.3-readline \ php7.3-opcache \ php7.3-xdebug \ php7.3-dom \ php-xdebug \ php7.3-curl \ unzip #Enable xdebug - phpunit uses this for code coverage phpenmod xdebug #Install composer php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" php composer-setup.php ; php -r "unlink('composer-setup.php');" ; mv composer.phar /usr/local/bin/composer #Various handy node based dev tools - do you need these during your build? Comment if not. #npm install -g gulp #npm install -g grunt #npm install -g webpack # Start Mysql if you need it # - apt-get install -y mysql-server # - su mysql -s /bin/bash -c "/usr/sbin/mysqld" & build: commands: - echo Build started on `date` - echo Installing composer deps - composer install --no-progress --no-suggest post_build: commands: - echo Build completed on `date` # Do you need to do this? In many cases phpunit will use sqllite or similar to avoid the need for a real DB. # If you don't need it delete it # - /usr/bin/mysql -u root -e "GRANT ALL ON *.* TO 'test'@'localhost' IDENTIFIED BY '' WITH GRANT OPTION" # - mysqladmin -u test create test - ./vendor/bin/phpunit