forked from roketi/panel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
62 lines (50 loc) · 2.35 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
# Heavily inspired by the travis config file from Marc Neuhas (@apocalip) at
# https://github.com/mneuhaus/TYPO3.Neos
# Thanks man for sharing!
language: php
php:
- 5.6
- 5.5
- 5.4
before_script:
# update Composer and install the whole checked out application
- composer self-update
- composer install --dev
# install the webserver incl. PHP FPM
- sudo apt-get update
- sudo apt-get install apache2 libapache2-mod-fastcgi
- sudo cp ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf.default ~/.phpenv/versions/$(phpenv version-name)/etc/php-fpm.conf
- sudo a2enmod rewrite actions fastcgi alias
- echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- ~/.phpenv/versions/$(phpenv version-name)/sbin/php-fpm
# configure apache virtual hosts
- sudo cp -f Build/Travis/VirtualHost /etc/apache2/sites-available/default
- sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)?g" --in-place /etc/apache2/sites-available/default
- echo "127.0.0.1 roketi-panel.test" | sudo tee -a /etc/hosts
- sudo service apache2 restart
# create application configuration
- mkdir -p Configuration/Testing/Behat
- cp Build/Travis/Settings.yaml Configuration/Testing/Behat/Settings.yaml
- mkdir -p Configuration/Development/Behat
- cp Build/Travis/Settings.yaml Configuration/Development/Behat/Settings.yaml
# set up behat
- php ./flow behat:setup
# create the database
- mysql -e 'CREATE DATABASE roketi;'
# prepare the database schema and create a demo user
- FLOW_CONTEXT=Development/Behat ./flow doctrine:migrate
- FLOW_CONTEXT=Development/Behat ./flow Roketi.Panel:setup:createadminuser --username "john.doe" --password "12345"
# warmup Caches
- FLOW_CONTEXT=Development/Behat ./flow flow:cache:warmup
after_script:
# remove the database
- mysql -e 'DROP DATABASE roketi;'
script:
# run the actual tests, but not the function tests of Flow itself
- phpunit -c Build/BuildEssentials/PhpUnit/UnitTests.xml --coverage-clover=coverage.clover Packages/Application/Roketi.Panel/Tests/Unit
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover
# - phpunit -c Build/BuildEssentials/PhpUnit/FunctionalTests.xml
- bin/behat -c Packages/Application/Roketi.Panel/Tests/Behavior/behat.yml -v
notifications:
slack: roketi:IdZSgbPv9asoeiUUAssydJ58