forked from pimcore/pimcore
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
171 lines (148 loc) · 4.13 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# see https://docs.travis-ci.com/user/customizing-the-build/
notifications:
email:
- travis-ci@pimcore.org
branches:
only:
- master
- /^v?\d+\..*/
- /.*_travis$/
sudo: false
language: php
services:
- redis
- mysql
# see https://docs.travis-ci.com/user/installing-dependencies
addons:
artifacts:
s3_region: "eu-west-1" # see https://docs.aws.amazon.com/general/latest/gr/rande.html
debug: true
paths: # - $(ls var/logs/*.log | tr "\n" ":")
# - app/config
- var/logs
- tests/_output/var/classes
- phpstan-baseline.neon
hosts:
- pimcore-test.dev
# see https://docs.travis-ci.com/user/build-matrix/
jobs:
allow_failures:
# Run PHPStan level 3 without baseline, but allow them to fail
- os: linux
php: 7.4
env:
- TASK_TESTS=0
- TASK_STAN=1
- PHPSTAN_BASELINE=0
- os: linux
php: nightly
env:
- DATABASE_SERVER="mariadb-10.2"
include:
# All tests
- name: "All Tests - PHP 7.4 | MariaDB 10.4"
os: linux
sudo: required
php: 7.4
env:
- DATABASE_SERVER="mariadb-10.4"
- name: "All Tests - PHP 7.4 | Percona 5.7"
os: linux
sudo: required
php: 7.4
env:
- DATABASE_SERVER="percona-server-5.7"
- name: "All Tests - PHP 8 | MariaDB 10.2"
os: linux
sudo: required
php: nightly
env:
- DATABASE_SERVER="mariadb-10.2"
- name: "All Tests - PHP 7.4 | MySQL 8.0 | Lowest dependencies"
os: linux
sudo: required
php: 7.4
env:
- DATABASE_SERVER="mysql-8.0"
- COMPOSER_PREFER_LOWEST=1
# Test Stan - see https://github.com/phpstan/phpstan
- name: "PHPStan - PHP 7.4 | Level 3 | baseline"
os: linux
php: 7.4
env:
- TASK_TESTS=0
- TASK_STAN=1
- name: "PHPStan - PHP 7.4 | Level 3 | baseline | Lowest dependencies"
os: linux
php: 7.4
env:
- TASK_TESTS=0
- TASK_STAN=1
- COMPOSER_PREFER_LOWEST=1
- name: "PHPStan - PHP 7.4 | Level 3"
os: linux
php: 7.4
env:
- TASK_TESTS=0
- TASK_STAN=1
- PHPSTAN_BASELINE=0
- name: "PHPStan - PHP 7.4 | Level 3 | Generate baseline"
os: linux
php: 7.4
env:
- TASK_TESTS=0
- TASK_STAN=1
- PHPSTAN_BASELINE_GENERATE=1
# Test Docs
- name: "Documentation"
os: linux
php: 7.4
env:
- TASK_TESTS=0
- TASK_DOCS=1
cache:
directories:
- tmp-docs/pimcore-docs/vendor
fast_finish: true
cache:
directories:
- $HOME/.cache/composer
env:
global:
- COMPOSER_MEMORY_LIMIT=-1
- COMPOSER_NO_INTERACTION=1
- COMPOSER_PREFER_LOWEST=0
- TASK_TESTS=1
- TASK_STAN=0
- TASK_DOCS=0
- PHPSTAN_LEVEL=3
- PHPSTAN_BASELINE=1
- PHPSTAN_BASELINE_GENERATE=0
- PIMCORE_ENVIRONMENT=test
- PIMCORE_TEST=1
- PIMCORE_TEST_URL=http://pimcore-test.dev
- PIMCORE_TEST_DB_DSN="mysql://root@localhost/pimcore_test"
- PIMCORE_TEST_REDIS_DSN="redis://localhost"
- DATABASE_SERVER="mariadb-10.4"
- PIMCORE_PROJECT_ROOT=$TRAVIS_BUILD_DIR
# see https://docs.travis-ci.com/user/job-lifecycle/
before_install:
# see https://docs.travis-ci.com/user/job-lifecycle/
install:
- if [ $TASK_TESTS == 1 ]; then .travis/setup-tests.sh; fi
- if [ $TASK_STAN == 1 ]; then .travis/setup-tests.sh; fi
- if [ $TASK_DOCS == 1 ]; then .travis/setup-docs.sh; fi
# see https://docs.travis-ci.com/user/job-lifecycle/
before_script:
- yes | pecl install imagick
- phpenv config-rm xdebug.ini || true
- if [ $TASK_TESTS == 1 ]; then .travis/setup-php.sh; fi
- if [ $TASK_TESTS == 1 ]; then .travis/setup-functional-tests.sh; fi
- if [ $TASK_STAN == 1 ]; then .travis/setup-php.sh; fi
- mysql --version
- mysql -e "CREATE DATABASE pimcore_test CHARSET=utf8mb4;"
# see https://docs.travis-ci.com/user/job-lifecycle/
script:
- if [ $TASK_TESTS == 1 ]; then .travis/run-tests.sh; fi
- if [ $TASK_DOCS == 1 ]; then .travis/run-docs.sh; fi
- if [ $TASK_STAN == 1 ]; then .travis/run-stan.sh; fi