Skip to content

Instantly share code, notes, and snippets.

@lennartvdd
Last active August 29, 2015 14:17
Show Gist options
  • Save lennartvdd/002f4635e10c35c6e384 to your computer and use it in GitHub Desktop.
Save lennartvdd/002f4635e10c35c6e384 to your computer and use it in GitHub Desktop.
CodeShip - Yii 1.x test setup script
# Set php version through phpenv. 5.3, 5.4 and 5.5 available
phpenv local 5.4
# == configure composer
composer config -g github-oauth.github.com $GITHUB_ACCESS_TOKEN # configure env var in project settings!
# == install composer global dependencies
composer global require "phpunit/phpunit=4.3.*"
composer global require "phpunit/phpunit-selenium"
composer global require "phpunit/php-invoker"
composer global require "phpunit/dbunit"
# == prepare application
cd ~/clone/public_html/protected # change directory to your applications protected dir.
chmod +x yiic
# Update DB Connection params.
cp config/console.test.php config/console.php
cp config/main.test.php config/main.php
# Run migrations
./yiic migrate --interactive=0
# move to test dir.
cd tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment