-
Notifications
You must be signed in to change notification settings - Fork 11
/
.travis.yml
executable file
·66 lines (55 loc) · 2.37 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
59
60
61
62
63
64
65
66
language: php
php:
- 5.4
- 5.5
env:
- SYMFONY_VERSION=2.4.*
before_script:
# Copy skeleton parameters file
- cp app/config/parameters.yml.dist app/config/parameters.yml
# Install packages
- sudo apt-get update > /dev/null
- sudo apt-get install -y --force-yes apache2 libapache2-mod-php5 php5-curl php5-mysql php5-intl
- npm install -g bower
- npm install -g less
- npm install -g [email protected]
- node -v
- nodeversion="$(node -v)"
- sudo ln -s /home/travis/.nvm/${nodeversion}/bin/node /usr/local/bin/node
- sudo ln -s /home/travis/.nvm/${nodeversion}/lib/node_modules /usr/local/lib/node_modules
# Create VirtualHost
- sudo sed -i -e "s,/var/www,$(pwd)/web,g" /etc/apache2/sites-available/default
- sudo sed -i -e "/DocumentRoot/i\ServerName chedream.local" /etc/apache2/sites-available/default
- echo "127.0.0.1 chedream.local" | sudo tee -a /etc/hosts
- sudo /etc/init.d/apache2 restart
# Update php.ini
- echo 'display_errors = On' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo 'html_errors = On' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo 'short_open_tag = Off' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo 'date.timezone = "Europe/Kiev"' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
# Update composer
- composer self-update
- composer install --dev --prefer-dist
# Make symfony2 preparation steps
- mkdir -p web/upload/media
- app/console do:da:cr -e=test > /dev/null
- app/console do:sc:cr -e=test > /dev/null
- php app/console doctrine:fixtures:load --no-interaction
- php app/console assets:install --symlink
- php app/console assetic:dump
- sudo chmod -R 777 app/cache app/logs
- app/console --env=test cache:warmup
- sudo chmod -R 777 app/cache app/logs
# Check
- php app/check.php
# Setup selenium
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16"
- sleep 5
- "wget http://selenium.googlecode.com/files/selenium-server-standalone-2.31.0.jar"
- "java -jar selenium-server-standalone-2.31.0.jar &"
- sleep 10
script:
- bin/phpunit -c app
# - bin/behat @GeekhubDreamBundle