-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
84 lines (80 loc) · 3.15 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
language: php
php:
- 7.0
- 7.1
sudo: required
dist: trusty
env:
global:
- COMPOSER_BIN_DIR=~/bin
- INTEGRATION_SETS=3
- NODE_JS_VERSION=6
- MAGENTO_HOST_NAME="magento2.travis"
matrix:
- MAGENTO_VERSION=2.2 TEST_SUITE=unit
- MAGENTO_VERSION=2.2 TEST_SUITE=static
- MAGENTO_VERSION=2.2 TEST_SUITE=js GRUNT_COMMAND=spec
- MAGENTO_VERSION=2.2 TEST_SUITE=js GRUNT_COMMAND=static
- MAGENTO_VERSION=2.2 TEST_SUITE=integration INTEGRATION_INDEX=1
- MAGENTO_VERSION=2.2 TEST_SUITE=integration INTEGRATION_INDEX=2
- MAGENTO_VERSION=2.2 TEST_SUITE=integration INTEGRATION_INDEX=3
- MAGENTO_VERSION=2.2 TEST_SUITE=functional
matrix:
exclude:
# Only run JS unit tests with PHP 7.1
- php: 7.0
env: MAGENTO_VERSION=2.2 TEST_SUITE=js GRUNT_COMMAND=spec
# Only run static tests with PHP 7.1
- php: 7.0
env: MAGENTO_VERSION=2.2 TEST_SUITE=static
- php: 7.0
env: MAGENTO_VERSION=2.2 TEST_SUITE=js GRUNT_COMMAND=static
- php: 7.0
env: MAGENTO_VERSION=2.2 TEST_SUITE=functional
# No specific tests to run
- php: 7.1
env: MAGENTO_VERSION=2.2 TEST_SUITE=js GRUNT_COMMAND=static
- php: 7.1
env: MAGENTO_VERSION=2.2 TEST_SUITE=js GRUNT_COMMAND=spec
# Give up trying to make these work
- php: 7.0
env: MAGENTO_VERSION=2.2 TEST_SUITE=functional
- php: 7.1
env: MAGENTO_VERSION=2.2 TEST_SUITE=functional
cache:
apt: true
directories:
- "$HOME/.composer/cache"
- "$HOME/.nvm"
addons:
apt:
packages:
- mysql-server-5.6
- mysql-client-core-5.6
- mysql-client-5.6
- postfix
firefox: '46.0'
hosts:
- magento2.travis
before_install:
- git clone https://github.com/magento/magento2 --branch $MAGENTO_VERSION
- cd magento2
- bash ./dev/travis/before_install.sh
install:
- composer install --no-interaction --prefer-dist
- composer config repositories.test_target git https://github.com/${TRAVIS_REPO_SLUG}.git
- composer require mugar/module-invoice-type dev-$TRAVIS_BRANCH
before_script:
#- cp -f ${TRAVIS_BUILD_DIR}/dev/tests/unit/phpunit.xml dev/tests/unit/
#- cp -f ${TRAVIS_BUILD_DIR}/dev/tests/static/less/whitelist/common.txt dev/tests/static/testsuite/Magento/Test/Less/_files/whitelist/common.txt
#- cp -f ${TRAVIS_BUILD_DIR}/dev/tests/static/php/whitelist/common.txt dev/tests/static/testsuite/Magento/Test/Php/_files/whitelist/common.txt
#- cp -f ${TRAVIS_BUILD_DIR}/dev/tests/static/js/whitelist/store-info-blocks.txt dev/tests/static/testsuite/Magento/Test/Js/_files/whitelist/
#- rm dev/tests/static/testsuite/Magento/Test/Js/_files/whitelist/magento.txt
- bash ./dev/travis/before_script.sh
script:
# Set arguments for variants of phpunit based tests; '|| true' prevents failing script when leading test fails
- test $TEST_SUITE = "functional" && TEST_FILTER='dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests.php' || true
# The scripts for grunt/phpunit type tests
- if [ $TEST_SUITE == "functional" ]; then dev/tests/functional/vendor/phpunit/phpunit/phpunit -c dev/tests/$TEST_SUITE $TEST_FILTER; fi
- if [ $TEST_SUITE != "functional" ] && [ $TEST_SUITE != "js" ]; then phpunit -c dev/tests/$TEST_SUITE $TEST_FILTER; fi
- if [ $TEST_SUITE == "js" ]; then grunt $GRUNT_COMMAND; fi