-
Notifications
You must be signed in to change notification settings - Fork 10
/
.travis.yml
48 lines (47 loc) · 1.92 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.5
- 5.6
- 7.0
env:
- MAGE=1.9.1.0
- MAGE=1.9.1.1
- MAGE=1.9.0.0
- MAGE=1.8.1.0
- MAGE=1.7.0.2
cache:
directories:
- $HOME/.composer
before_script:
- MAGE_DIR=build
# Install mage-ci
- source <(curl -s https://raw.githubusercontent.com/EcomDev/MageCI/master/installer)
- wget https://files.magerun.net/n98-magerun.phar --no-check-certificate
- mv ./n98-magerun.phar bin/magerun && chmod +x bin/magerun
# Remove composer lock as it gives issues with coveralls
- rm composer.lock
# Installing magento version with prepared DB dump
- bin/magerun install --dbHost="localhost" --dbUser="root" --dbPass="" --dbName="magento" --installSampleData=no --useDefaultConfigParams=yes --magentoVersionByName="magento-mirror-$MAGE" --installationFolder="$MAGE_DIR" --baseUrl="http://magento.dev/"
# Copy composer.json for a build (without magento dependency)
- cp .travis/composer.json ./composer.json
# Update composer
- composer self-update
# Installing dependencies
- composer install
# Configuring EcomDev_PHPUnit module
- bin/mage-ci shell $MAGE_DIR ecomdev-phpunit.php -a install
- bin/mage-ci shell $MAGE_DIR ecomdev-phpunit.php -a magento-config --db-name magento --same-db 1 --base-url http://test.magento.com/
# Disable phpnunit extension unit tests
- bin/mage-ci shell $MAGE_DIR ecomdev-phpunit.php -a change-status
# Installing main module into Magento module
- bin/mage-ci install-module $MAGE_DIR $(pwd)
# Enable
- cp .travis/EcomDev_LayoutCompilerTestEnabler.xml build/app/etc/modules/
- cp .travis/phpunit.xml build/
- mkdir -p build/var/phpunit/cov
script:
- bin/phpunit -c phpunit.xml --colors --coverage-php=build/var/phpunit/cov/01-unit.cov
- bin/mage-ci phpunit $MAGE_DIR --colors --coverage-php=var/phpunit/cov/02-$MAGE_DIR.cov
after_script:
- bin/phpcov merge --clover build/var/phpunit/coverage-merged.xml -- build/var/phpunit/cov
- bin/coveralls -v