forked from Alexandre-T/doctrine2-spatial
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
163 lines (156 loc) · 4.33 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
language: php
dist: bionic
cache:
directories:
- vendor
- $HOME/.composer/cache
install:
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
- composer config -g discard-changes 1 # because we used travis cache and, sometimes, packages change
- mkdir -p ./build/coverage
- composer install --prefer-source
script:
- |
if [ "x$COVERAGE" == "xyes" ]; then
./vendor/bin/phpunit -v --configuration ./tests/travis/$DB.travis.xml --coverage-php ./build/coverage/coverage-$DB-$TRAVIS_PHP_VERSION-2.7.cov
else
./vendor/bin/phpunit -v --configuration ./tests/travis/$DB.travis.xml
fi
# Code shall respect rules
- composer check-quality-code
after_script:
- |
if [ "x$COVERAGE" == "xyes" ]; then
./vendor/bin/phpcov merge --clover ./build/logs/clover.xml ./build/coverage
./vendor/bin/coveralls -v --exclude-no-stmt
fi
#Push code climate coverage
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
notifications:
webhooks: https://coveralls.io/webhook?repo_token=$COVERALLS_WEBHOOK
jobs:
include:
#MySQL 8 PHP 7.3
- stage: Test MySQL
php: 7.3
env: DB=mysql.docker MYSQL_VERSION=8.0
sudo: required
services:
- docker
before_script:
- bash ./tests/travis/install-mysql-8.0.sh
#MySQLi 8 PHP 7.3
- stage: Test MySQLi
php: 7.3
env: DB=mysqli.docker MYSQL_VERSION=8.0
sudo: required
services:
- docker
before_script:
- bash ./tests/travis/install-mysql-8.0.sh
#PostgreSQL11 PHP 7.3 Postgis 2.5
- stage: Test PostgreSQL
php: 7.3
env: DB=pgsql POSTGRESQL_VERSION=11.0
sudo: required
addons:
postgresql: "11"
apt:
packages:
- postgis
- postgresql-11-postgis-2.5
#MySQL 5.7 PHP 7.4
- stage: Test MySQL
php: 7.4
env: DB=mysql MYSQL_VERSION=5.7 COVERAGE=yes
services:
- mysql
#MySQL 8 PHP 7.4
- stage: Test MySQL
php: 7.4
env: DB=mysql.docker MYSQL_VERSION=8.0 COVERAGE=yes
sudo: required
services:
- docker
before_script:
- bash ./tests/travis/install-mysql-8.0.sh
#MySQLi5.7 PHP 7.4
- stage: Test MySQLi
php: 7.4
env: DB=mysqli MYSQL_VERSION=5.7 COVERAGE=yes
services:
- mysql
#MySQLi8 PHP 7.4
- stage: Test MySQLi
php: 7.4
env: DB=mysqli.docker MYSQL_VERSION=8.0 COVERAGE=yes
sudo: required
services:
- docker
before_script:
- bash ./tests/travis/install-mysql-8.0.sh
#PostgreSQL9.6 PHP7.4 Postgis 2.5
- stage: Test PostgreSQL
php: 7.4
env: DB=pgsql POSTGRESQL_VERSION=9.6 COVERAGE=yes
addons:
postgresql: "9.6"
apt:
packages:
- postgis
- postgresql-9.6-postgis-2.5
#PostgreSQL10 PHP7.4 Postgis 2.5
- stage: Test PostgreSQL
php: 7.4
env: DB=pgsql POSTGRESQL_VERSION=10.0 COVERAGE=yes
sudo: required
addons:
postgresql: "10"
apt:
packages:
- postgresql-10
- postgresql-client-10
- postgis
- postgresql-10-postgis-2.5
#PostgreSQL11 PHP7.4 Postgis 2.5
- stage: Test PostgreSQL
php: 7.4
env: DB=pgsql POSTGRESQL_VERSION=11.0 COVERAGE=yes
sudo: required
addons:
postgresql: "11"
apt:
packages:
- postgis
- postgresql-11-postgis-2.5
#MySQL 8 PHP 8.0
- stage: Test Doctrine 2.8
php: 8.0
env: DB=mysql.docker MYSQL_VERSION=8.0
sudo: required
services:
- docker
before_script:
- bash ./tests/travis/install-mysql-8.0.sh
#MySQLi 8 PHP 8.0
- stage: Test Doctrine 2.8
php: 8.0
env: DB=mysqli.docker MYSQL_VERSION=8.0
sudo: required
services:
- docker
before_script:
- bash ./tests/travis/install-mysql-8.0.sh
#PostgreSQL11 PHP 8.0 Postgis 2.5
- stage: Test Doctrine 2.8
php: 8.0
env: DB=pgsql POSTGRESQL_VERSION=11.0
sudo: required
addons:
postgresql: "11"
apt:
packages:
- postgis
- postgresql-11-postgis-2.5