forked from magento/ece-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
74 lines (62 loc) · 2.65 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
dist: trusty
sudo: required
addons:
hosts:
- web
git:
depth: false
services:
- docker
language: php
php:
- '7.0'
- '7.1'
- '7.2'
env:
matrix:
- TEST_SUITE=static-unit XDEBUG=true
- TEST_SUITE=integration
- TEST_SUITE=functional
- TEST_SUITE=functional FUNCTIONAL_INDEX=1
- TEST_SUITE=functional FUNCTIONAL_INDEX=2
- TEST_SUITE=functional FUNCTIONAL_INDEX=3
matrix:
exclude:
- php: '7.0'
env: TEST_SUITE=integration
- php: '7.0'
env: TEST_SUITE=functional FUNCTIONAL_INDEX=1
- php: '7.0'
env: TEST_SUITE=functional FUNCTIONAL_INDEX=2
- php: '7.0'
env: TEST_SUITE=functional FUNCTIONAL_INDEX=3
- php: '7.1'
env: TEST_SUITE=integration
- php: '7.1'
env: TEST_SUITE=functional FUNCTIONAL_INDEX=1
- php: '7.1'
env: TEST_SUITE=functional FUNCTIONAL_INDEX=2
- php: '7.1'
env: TEST_SUITE=functional FUNCTIONAL_INDEX=3
- php: '7.2'
env: TEST_SUITE=functional
install:
- if [ $TRAVIS_SECURE_ENV_VARS != "true" ]; then composer remove magento/magento-cloud-components --no-update; fi;
- if [ $TRAVIS_SECURE_ENV_VARS != "true" ]; then composer config --unset repositories.repo.magento.com; fi;
- if [ $TRAVIS_SECURE_ENV_VARS == "true" ]; then composer config http-basic.repo.magento.com ${REPO_USERNAME} ${REPO_PASSWORD}; fi;
- if [ $TRAVIS_SECURE_ENV_VARS == "true" ]; then composer config github-oauth.github.com ${GITHUB_TOKEN}; fi;
- if [ -n "${MCP_VERSION}" ]; then composer config repositories.mcp git git@github.com:magento/magento-cloud-patches.git && composer require "magento/magento-cloud-patches:${MCP_VERSION}" --no-update; fi;
- if [ -n "${MCC_VERSION}" ]; then composer config repositories.mcc git git@github.com:magento/magento-cloud-components.git && composer require "magento/magento-cloud-components:${MCC_VERSION}" --no-update; fi;
- composer update -n --no-suggest
before_script:
- echo "COMPOSER_MAGENTO_USERNAME=${REPO_USERNAME}" >> ./.docker/composer.env
- echo "COMPOSER_MAGENTO_PASSWORD=${REPO_PASSWORD}" >> ./.docker/composer.env
- echo "COMPOSER_GITHUB_TOKEN=${GITHUB_TOKEN}" >> ./.docker/composer.env
- if [ $XDEBUG == "true" ]; then echo "PHP_ENABLE_XDEBUG=true" >> ./.docker/global.env; fi;
- sudo /etc/init.d/mysql stop
- ./tests/travis/prepare_functional_parallel.sh
script:
- if [ $TEST_SUITE == "static-unit" ]; then ./tests/travis/static-unit.sh; fi
- if [ $TRAVIS_SECURE_ENV_VARS == "true" ] && [ $TEST_SUITE == "integration" ]; then ./tests/travis/integration.sh; fi;
- if [ $TRAVIS_SECURE_ENV_VARS == "true" ] && [ $TEST_SUITE == "functional" ]; then ./tests/travis/functional.sh; fi;
after_failure: docker ps -s