-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
43 lines (43 loc) · 2 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
language: php
php:
- 5.3
before_script:
- cd ../
- mkdir ./fs-test
- cd fs-test
- mkdir ./libs
- git clone git://github.com/yiisoft/yii.git libs/yii --depth=1
- echo yes | php libs/yii/framework/yiic webapp . git > /dev/null
- ln -s /home/travis/build/mediasite/yii-LocalFS/ /home/travis/build/mediasite/fs-test/protected/extensions/yii-LocalFS
- rm ./protected/tests/fixtures -R
- rm ./protected/tests/functional -R
- rm ./protected/tests/unit -R
- cp /home/travis/build/mediasite/yii-LocalFS/tests/* ./protected/tests/ -R
- mkdir ./protected/tests/log
- sudo apt-get update > /dev/null
- sudo apt-get install nginx-full php5-fpm memcached php5-memcached php5-cli php5-curl php5-mysql php5-gd imagemagick > /dev/null
- phpenv global system
# - sudo rm /etc/php5/fpm/conf.d/* -R
# - sudo cp ./protected/extensions/yii-LocalFS/travis-conf/conf.d/* /etc/php5/fpm/conf.d/
# - sudo cp ./protected/extensions/yii-LocalFS/travis-conf/php.ini /etc/php5/fpm/php.ini
- sudo rm /etc/nginx/sites-enabled/*
- sudo cp ./protected/extensions/yii-LocalFS/travis-conf/site.nginx /etc/nginx/sites-enabled/
- sudo cp ./protected/extensions/yii-LocalFS/travis-conf/www.conf /etc/php5/fpm/pool.d/www.conf
# composer
- cd ./protected/extensions/yii-LocalFS/travis-conf/
- sudo sh -c "curl -s https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin" > /dev/null
- sudo mv /usr/local/bin/composer.phar /usr/local/bin/composer
- composer install
- ls vendor/bin
- cd ../../../../
# restarting services
- sudo service nginx restart
- sudo service php5-fpm restart
- mysql -e "create database IF NOT EXISTS localfs_test DEFAULT CHARACTER SET utf8;" -uroot
- cp ./protected/extensions/yii-LocalFS/travis-conf/project/* ./protected/config/
- cp ./protected/extensions/yii-LocalFS/migrations ./protected/ -R
- ./protected/yiic migrate up --interactive=0
- cd ./protected/tests
notifications:
email: false
script: ../extensions/yii-LocalFS/travis-conf/vendor/bin/phpunit --verbose --debug .