sh Codeship - Symfony2与mysql - phpunit

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh Codeship - Symfony2与mysql - phpunit相关的知识,希望对你有一定的参考价值。

# Set php version through phpenv
phpenv local 5.5

# Modify memory limit and realpath cache size
echo "realpath_cache_size = 4096k" >> $HOME/.phpenv/versions/5.5/etc/php.ini
echo "memory_limit = 512M" >> $HOME/.phpenv/versions/5.5/etc/php.ini

# Disable xdebug
echo "xdebug.remote_autostart=0" >> $HOME/.phpenv/versions/5.5/etc/php.ini
echo "xdebug.remote_enable=0" >> $HOME/.phpenv/versions/5.5/etc/php.ini
echo "xdebug.profiler_enable=0" >> $HOME/.phpenv/versions/5.5/etc/php.ini

# Set environment variables
export SYMFONY_ENV=test
export SYMFONY__TEST_DATABASE_NAME=test
export SYMFONY__TEST_DATABASE_USER=$MYSQL_USER
export SYMFONY__TEST_DATABASE_PASSWORD=$MYSQL_PASSWORD

# Copy the parameters.yml.dist
cp app/config/parameters.yml.dist app/config/parameters.yml

# Install dependencies
composer install --prefer-source --no-interaction

# Drop and create database
php ./app/console --env=test doctrine:database:drop --force
php ./app/console --env=test doctrine:database:create

# Update database schema
php ./app/console --env=test doctrine:schema:update --force

# Clear cache
php ./app/console --env=test cache:clear

# If phpunit is composer's dependency
bin/phpunit -c app/
# Else
# phpunit -c app/

以上是关于sh Codeship - Symfony2与mysql - phpunit的主要内容,如果未能解决你的问题,请参考以下文章

sh Codeship - NodeJS +业力测试

sh 用于elasticbeanstalk的Codeship部署脚本

sh WPEngine的Codeship Custom Deploy脚本

sh 在特定端口上运行的Codeship上设置Neo4j

sh Neo4j - 在Codeship构建盒上下载并启动带有空间插件的Neo4j

使用 Codeship 持续部署