forked from redkite-labs/RedKiteCms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
executable file
·48 lines (41 loc) · 2.07 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
language: php
php:
- 5.3
- 5.4
env:
- DB=mysql
- DB=pgsql
- DB=sqlite
addons:
postgresql: "9.3"
firefox: "28.0"
before_install:
- export DISPLAY=:99.0
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x24"
- wget http://selenium-release.storage.googleapis.com/2.41/selenium-server-standalone-2.41.0.jar
- java -jar selenium-server-standalone-2.41.0.jar > /dev/null &
before_script:
- sudo apt-get update > /dev/null
- sudo apt-get install -y --force-yes apache2 libapache2-mod-php5 php5-curl php5-mysql php5-sqlite php5-pgsql php5-intl
- sudo sed -i -e "s,/var/www,$(pwd)/web,g" /etc/apache2/sites-available/default
- sudo /etc/init.d/apache2 restart
- composer self-update
- composer install --dev
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'create database redkite_test;'; fi"
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'create database redkite_test;' -U postgres; fi"
- sh -c "if [ '$DB' = 'sqlite' ]; then php app/console redkitecms:configure --driver=sqlite --host=localhost --database=redkite_test --website-url=http://example.com/ --no-interaction; fi"
- sh -c "if [ '$DB' = 'mysql' ]; then php app/console redkitecms:configure --driver=mysql --host=localhost --port=3306 --database=redkite_test --user=root --password= --website-url=http://example.com/ --no-interaction; fi"
- sh -c "if [ '$DB' = 'pgsql' ]; then php app/console redkitecms:configure --driver=pgsql --host=localhost --port=5432 --database=redkite_test --user=postgres --password= --website-url=http://example.com/ --no-interaction; fi"
- php app/rkconsole redkitecms:install --env=rkcms
- phpunit --version
script:
- phpunit -c app --coverage-clover=coverage.clover
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
- sudo chmod -R 0777 ./../RedKiteCms
- bin/behat --profile=$DB
- sudo chmod -R 0777 ./../RedKiteCms
- bin/behat --profile=cms
notifications:
email: