Run unit tests and build documentation on Vagrant provisioning

This commit is contained in:
PJ Dietz 2015-03-10 20:11:56 -04:00
parent a0116166f7
commit 7c00fb8342
1 changed files with 11 additions and 0 deletions

View File

@ -10,10 +10,21 @@ else
curl -sS https://getcomposer.org/installer | php -- --filename=composer --install-dir=/usr/local/bin
fi
# Install Python dependencies
pip install sphinx sphinx_rtd_theme
# Install Composer dependencies
composer --working-dir=/vagrant install
# Run the unit tests.
cd /vagrant
vendor/bin/phpunit
# Build the documentation.
cd /vagrant/docs
make clean && make html
# Drop the user into the /vagrant directory on log in and dislay a message.
if ! grep /home/vagrant/.bashrc -e "cd /vagrant" &> /dev/null ; then
echo "cd /vagrant" >> /home/vagrant/.bashrc
echo "cat /vagrant/vagrant/log-in-message.txt" >> /home/vagrant/.bashrc