forked from EcomDev/EcomDev_PHPUnit
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
39 lines (39 loc) · 1.48 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
language: php
php:
- 5.6
env:
matrix:
- MAGE=1.9.2.4
cache:
directories:
- "$HOME/.composer/cache"
services:
- mysql
before_script:
- MAGE_DIR=magento
# Installing dependencies
- composer install --no-interaction --prefer-dist
# Installing magento version with prepared DB dump
- git clone https://github.com/OpenMage/magento-lts.git --depth 1 --branch $MAGE $MAGE_DIR
- cp .travis/local.xml $MAGE_DIR/app/etc/
- mkdir tmp
- curl -o ./tmp/sample-data.tgz https://raw.githubusercontent.com/Vinai/compressed-magento-sample-data/1.9.1.0/compressed-no-mp3-magento-sample-data-1.9.1.0.tgz
- tar -xzf ./tmp/sample-data.tgz -C ./tmp/
- mysql -e "DROP DATABASE IF EXISTS magento; CREATE DATABASE magento;"
- mysql magento < ./tmp/magento-sample-data-1.9.1.0/magento_sample_data_for_1.9.1.0.sql
# Installing EcomDev_PHPUnit module
- ./vendor/bin/modman init $MAGE_DIR
- ./vendor/bin/modman link $(pwd)
- ./vendor/bin/modman deploy-all --force
# Configuring EcomDev_PHPUnit module
- cd $MAGE_DIR/shell
- php ecomdev-phpunit.php -a magento-config --db-name magento --same-db 1 --base-url http://test.magento.com/
# Configuring test suite
- php ecomdev-phpunit.php -a change-status --enable
# Copying phpunit.xml for travis builds
- cd $TRAVIS_BUILD_DIR
- cp .travis/phpunit.xml $MAGE_DIR/phpunit.xml
script:
# output php ini info for checking the problem
- cd $MAGE_DIR
- $TRAVIS_BUILD_DIR/vendor/bin/phpunit --colors --coverage-text -d display_errors=1