forked from spryker-shop/suite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
99 lines (79 loc) · 3.57 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
language: php
env:
global:
- APPLICATION_ENV=devtest
- APPLICATION_STORE=DE
- PROJECT=suite
matrix:
fast_finish: true
include:
- php: "7.1"
env:
- TEST_GROUP=without-acceptance
- php: "7.1"
env:
- TEST_GROUP=acceptance
- php: "7.1"
env:
- VALIDATION=1
addons:
postgresql: 9.6
mysql: 5.7
apt:
packages:
- graphviz
hosts:
- zed.de.spryker.test
- www.de.spryker.test
cache:
directories:
- $HOME/.composer/cache
services:
- postgresql
- mysql
- redis
- rabbitmq
sudo: required
before_install:
- echo "extension = redis.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- if [[ $DB == 'mysql' ]]; then chmod +x ./config/Shared/ci/travis/mysql/* ; fi
- if [[ $DB == 'mysql' ]]; then ./config/Shared/ci/travis/mysql/travis_mysql_5.7.sh ; fi
- ( awk '1;/@hook travis-ci/{exit}' config/Shared/stores.php ; awk 'NR>1' config/Shared/ci/travis/stores.php ; awk '/@hook travis-ci/,0' config/Shared/stores.php ) > config/Shared/stores_tmp.php ; mv config/Shared/stores_tmp.php config/Shared/stores.php
install:
- chmod -R a+x config/Shared/ci/travis/
- composer install --optimize-autoloader --no-interaction
- config/Shared/ci/travis/install_elasticsearch.sh
before_script:
- nvm install 8
- mkdir -p shared/data/common/jenkins
- mkdir -p shared/data/common/jenkins/jobs
- mkdir -p data/DE/cache/Yves/twig -m 0777
- mkdir -p data/DE/cache/Zed/twig -m 0777
- mkdir -p data/DE/logs -m 0777
- chmod -R 777 data/
- if [[ -z $DB ]] ; then cat config/Shared/ci/travis/postgresql_ci.config >> config/Shared/ci/travis/config_ci.php ; fi
- if [[ $DB == 'mysql' ]] ; then cat config/Shared/ci/travis/mysql_ci.config >> config/Shared/ci/travis/config_ci.php ; fi
- cp config/Shared/ci/travis/config_ci.php config/Shared/config_local.php
- if [[ $DB == 'mysql' ]] ; then sudo cp config/Shared/ci/travis/mysql/my.cnf /etc/ ; fi
- if [[ $DB == 'mysql' ]] ; then sudo service mysql restart ; fi
- if [[ $TEST_GROUP == 'acceptance' ]] ; then config/Shared/ci/travis/acceptance_env.sh ; fi
- if [[ $TEST_GROUP == 'acceptance' ]] ; then vendor/bin/install DE -r testing -v; fi
- if [[ $TEST_GROUP == 'without-acceptance' ]] ; then vendor/bin/install DE -r testing -x frontend -v; fi
- if [[ $VALIDATION == 1 ]] ; then vendor/bin/console transfer:generate ; fi
- if [[ $VALIDATION == 1 ]] ; then vendor/bin/console propel:install ; fi
- if [[ $VALIDATION == 1 ]] ; then vendor/bin/console transfer:generate ; fi
- if [[ $VALIDATION == 1 ]] ; then vendor/bin/console dev:ide:generate-auto-completion ; fi
- if [[ $VALIDATION == 1 ]] ; then vendor/bin/codecept build --ansi ; fi
- if [[ $VALIDATION == 1 ]] ; then vendor/bin/console transfer:databuilder:generate ; fi
- if [[ $VALIDATION == 1 ]] ; then vendor/bin/console setup:search ; fi
script:
- if [[ $VALIDATION == 1 ]] ; then vendor/bin/phpstan analyze -c phpstan.neon src/ -l 2 ; fi
- if [[ $VALIDATION == 1 ]] ; then vendor/bin/console propel:schema:validate ; fi
- if [[ $VALIDATION == 1 ]] ; then vendor/bin/console transfer:validate ; fi
- if [[ $VALIDATION == 1 ]] ; then vendor/bin/console code:sniff:style ; fi
- if [[ $VALIDATION == 1 ]] ; then vendor/bin/phpmd src/ text vendor/spryker/architecture-sniffer/src/ruleset.xml --minimumpriority 2 ; fi
- vendor/bin/phantomjs --webdriver=4444 &
- if [[ $TEST_GROUP == 'without-acceptance' ]] ; then vendor/bin/codecept run -x Presentation ; fi
- if [[ $TEST_GROUP == 'acceptance' ]] ; then vendor/bin/codecept run -g Presentation ; fi
notifications:
email: false