forked from smalot/magento-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
58 lines (48 loc) · 2.58 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# .travis.yml
language: php
env:
- DB=mysql
mysql:
database: magento_travis
username: travis
encoding: utf8
php:
- 5.3
# - 5.4
# - 5.5
before_script:
# install apache
- sudo apt-get update > /dev/null
- sudo apt-get install -y --force-yes apache2 libapache2-mod-php5 php5-curl php5-mysql php5-intl > /dev/null
- sudo a2enmod actions > /dev/null
- sudo a2enmod rewrite > /dev/null
- echo "export PATH=/home/vagrant/.phpenv/bin:$PATH" | sudo tee -a /etc/apache2/envvars > /dev/null
- echo "$(curl -fsSL https://gist.github.com/roderik/16d751c979fdeb5a14e3/raw/gistfile1.txt)" | sudo tee /etc/apache2/conf.d/phpconfig > /dev/null
- echo "$(curl -fsSL https://gist.github.com/roderik/2eb301570ed4a1f4c33d/raw/gistfile1.txt)" | sed -e "s,PATH,`pwd`/web,g" | sudo tee /etc/apache2/sites-available/default > /dev/null
- echo "127.0.0.1 magento.local" | sudo tee --append /etc/hosts
- sudo service apache2 restart
# setup mysql database
- "mysql -e 'create database magento_travis;'"
# clone magento and install data set test
- wget -O modgit https://raw.github.com/jreinke/modgit/master/modgit
- chmod +x modgit
- sudo mv modgit /usr/local/bin
- modgit init
- modgit clone -t 1.7.0.2 magento https://github.com/jreinke/magento-mirror.git > /dev/null
- wget -O magento-sample-data-1.6.1.0.zip http://www.magentocommerce.com/downloads/assets/1.6.1.0/magento-sample-data-1.6.1.0.zip
- unzip -q magento-sample-data-1.6.1.0.zip > /dev/null
- mysql -uroot magento_travis < magento-sample-data-1.6.1.0/magento_sample_data_for_1.6.1.0.sql
- php -f install.php -- --license_agreement_accepted yes --locale en_GB --timezone Europe/Paris --default_currency EUR --db_host localhost --db_name magento_travis --db_user travis --db_pass "" --url http://magento.local/ --skip_url_validation yes --use_rewrites no --use_secure no --secure_base_url --use_secure_admin no --admin_firstname Sebastien --admin_lastname Malot --admin_email [email protected] --admin_username admin --admin_password magento123
# clone current project and download dependencies
- curl -sS https://getcomposer.org/installer | php
- chmod +x composer.phar
- ./composer.phar update --prefer-source
#script: curl "http://localhost/index.php"
script: curl -s http://magento.local/ && sudo cat /var/log/apache2/error.log && curl -s http://localhost/index.php && sudo cat /var/log/apache2/error.log
notifications:
email:
recipients:
on_success: always # [always|never|change] # default: change
on_failure: always # [always|never|change] # default: always