Added automatic download and installation of Composer and PHPUnit for Vagrant (merge #550)
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -20,6 +20,7 @@
|
|||||||
*.rar
|
*.rar
|
||||||
*.tar
|
*.tar
|
||||||
*.zip
|
*.zip
|
||||||
|
*.phar
|
||||||
|
|
||||||
# Logs and databases #
|
# Logs and databases #
|
||||||
######################
|
######################
|
||||||
|
|||||||
30
Vagrantfile
vendored
30
Vagrantfile
vendored
@@ -7,6 +7,16 @@ echo "ServerName localhost" >> /etc/apache2/apache2.conf
|
|||||||
service apache2 restart
|
service apache2 restart
|
||||||
rm -f /var/www/html/index.html
|
rm -f /var/www/html/index.html
|
||||||
date > /etc/vagrant_provisioned_at
|
date > /etc/vagrant_provisioned_at
|
||||||
|
# install Composer
|
||||||
|
curl -s https://getcomposer.org/installer | php
|
||||||
|
sudo mv composer.phar /usr/local/bin/composer
|
||||||
|
# install PHPUnit
|
||||||
|
wget https://phar.phpunit.de/phpunit.phar
|
||||||
|
chmod +x phpunit.phar
|
||||||
|
sudo mv phpunit.phar /usr/local/bin/phpunit
|
||||||
|
phpunit --version
|
||||||
|
# Set kanboard dir as working dir
|
||||||
|
echo "cd /var/www/html" >> /home/vagrant/.bashrc
|
||||||
SCRIPT
|
SCRIPT
|
||||||
|
|
||||||
$script_mysql = <<SCRIPT
|
$script_mysql = <<SCRIPT
|
||||||
@@ -20,6 +30,16 @@ service mysql restart
|
|||||||
echo "create database kanboard;" | mysql -u root
|
echo "create database kanboard;" | mysql -u root
|
||||||
rm -f /var/www/html/index.html
|
rm -f /var/www/html/index.html
|
||||||
date > /etc/vagrant_provisioned_at
|
date > /etc/vagrant_provisioned_at
|
||||||
|
# install Composer
|
||||||
|
curl -s https://getcomposer.org/installer | php
|
||||||
|
sudo mv composer.phar /usr/local/bin/composer
|
||||||
|
# install PHPUnit
|
||||||
|
wget https://phar.phpunit.de/phpunit.phar
|
||||||
|
chmod +x phpunit.phar
|
||||||
|
sudo mv phpunit.phar /usr/local/bin/phpunit
|
||||||
|
phpunit --version
|
||||||
|
# Set kanboard dir as working dir
|
||||||
|
echo "cd /var/www/html" >> /home/vagrant/.bashrc
|
||||||
SCRIPT
|
SCRIPT
|
||||||
|
|
||||||
$script_postgres = <<SCRIPT
|
$script_postgres = <<SCRIPT
|
||||||
@@ -32,6 +52,16 @@ service apache2 restart
|
|||||||
service postgresql restart
|
service postgresql restart
|
||||||
rm -f /var/www/html/index.html
|
rm -f /var/www/html/index.html
|
||||||
date > /etc/vagrant_provisioned_at
|
date > /etc/vagrant_provisioned_at
|
||||||
|
# install Composer
|
||||||
|
curl -s https://getcomposer.org/installer | php
|
||||||
|
sudo mv composer.phar /usr/local/bin/composer
|
||||||
|
# install PHPUnit
|
||||||
|
wget https://phar.phpunit.de/phpunit.phar
|
||||||
|
chmod +x phpunit.phar
|
||||||
|
sudo mv phpunit.phar /usr/local/bin/phpunit
|
||||||
|
phpunit --version
|
||||||
|
# Set kanboard dir as working dir
|
||||||
|
echo "cd /var/www/html" >> /home/vagrant/.bashrc
|
||||||
SCRIPT
|
SCRIPT
|
||||||
|
|
||||||
Vagrant.configure("2") do |config|
|
Vagrant.configure("2") do |config|
|
||||||
|
|||||||
@@ -53,6 +53,8 @@ Time: 9.05 seconds, Memory: 17.75Mb
|
|||||||
OK (74 tests, 6145 assertions)
|
OK (74 tests, 6145 assertions)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**NOTE:** PHPUnit is already included in the Vagrant environment
|
||||||
|
|
||||||
### Testing with Mysql
|
### Testing with Mysql
|
||||||
|
|
||||||
You must have Mysql or MariaDb installed on localhost.
|
You must have Mysql or MariaDb installed on localhost.
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ Several configurations are available:
|
|||||||
- Ubuntu 14.04 LTS with Kanboard/Postgresql
|
- Ubuntu 14.04 LTS with Kanboard/Postgresql
|
||||||
- Debian 7.6 with Kanboard/Sqlite
|
- Debian 7.6 with Kanboard/Sqlite
|
||||||
|
|
||||||
|
All Vagrant environments come with Composer and PHPunit pre-installed.
|
||||||
|
|
||||||
To use those configurations, you have to install the **last version** of Virtualbox and Vagrant.
|
To use those configurations, you have to install the **last version** of Virtualbox and Vagrant.
|
||||||
|
|
||||||
Standard boxes can be download from [VagrantCloud](https://vagrantcloud.com):
|
Standard boxes can be download from [VagrantCloud](https://vagrantcloud.com):
|
||||||
@@ -24,8 +26,11 @@ If you want to test Kanboard on Ubuntu with Sqlite:
|
|||||||
vagrant up sqlite
|
vagrant up sqlite
|
||||||
```
|
```
|
||||||
|
|
||||||
|
**NOTE:** If you downloaded the dev version from GitHub instead of the pre-packaged zip file, remember to SSH into your Vagrant environment and run ```composer install```.
|
||||||
|
|
||||||
After the initialization, go to http://localhost:8001/.
|
After the initialization, go to http://localhost:8001/.
|
||||||
|
|
||||||
|
|
||||||
To test with Mysql:
|
To test with Mysql:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
Reference in New Issue
Block a user