-
Notifications
You must be signed in to change notification settings - Fork 121
/
.travis.yml
70 lines (52 loc) · 1.99 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
67
68
69
70
sudo: false
language: php
php:
- 5.4
- 5.5
env:
- MAGENTO_VERSION=magento-mirror-1.9.2.3
- MAGENTO_VERSION=magento-mirror-1.8.1.0
services:
- mysql
# Deletes build directoy and adds new tools
install:
# Clean build directory
- rm -rf build; mkdir build; cd build
# install coveralls
- wget https://github.com/satooshi/php-coveralls/releases/download/v1.0.0/coveralls.phar
- chmod +x coveralls.phar
- ./coveralls.phar --version
# install modman
- bash < <(wget -q --no-check-certificate -O - https://raw.github.com/colinmollenhour/modman/master/modman-installer)
- modman --version
# install n98-magerun
- wget --no-check-certificate https://files.magerun.net/n98-magerun.phar
- chmod +x n98-magerun.phar
- ./n98-magerun.phar --version
- export PATH=$PWD:$PATH
before_script:
# Clean mysql database
- mysql -e "DROP DATABASE IF EXISTS magento_test; CREATE DATABASE IF NOT EXISTS magento_test;" -uroot
- cd $TRAVIS_BUILD_DIR/build
# Install Magento
- n98-magerun.phar install --magentoVersion ${MAGENTO_VERSION} --installationFolder "magento" --dbHost "127.0.0.1" --dbUser "root" --dbPass "" --dbName "magento_test" --baseUrl "http://testmagento.local" --forceUseDb --useDefaultConfigParams yes --installSampleData no
- mkdir -p magento/var/log
# Install our module
- cd $TRAVIS_BUILD_DIR/build/magento
- n98-magerun.phar sys:info
- modman init
- modman link $TRAVIS_BUILD_DIR
# Install EcomDev_PHPUnit
- modman clone git://github.com/EcomDev/EcomDev_PHPUnit.git
- cd shell
- php ecomdev-phpunit.php -a magento-config -r --db-name "magento_test" --same-db true --base-url "http://testmagento.local"
- n98-magerun.phar sys:modules:list | grep -e 'Sheep\|EcomDev_PHPUnit'
script:
- cd $TRAVIS_BUILD_DIR/build
- mkdir logs
- cd $TRAVIS_BUILD_DIR/build/magento
- cp $TRAVIS_BUILD_DIR/phpunit.xml .
- phpunit -c phpunit.xml --group Sheep_Debug --coverage-clover ../logs/clover.xml
after_success:
- cd $TRAVIS_BUILD_DIR
- coveralls.phar -v