This repository was archived by the owner on Oct 3, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 82
/
Copy pathconfig.yml
266 lines (244 loc) · 6.52 KB
/
config.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
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
unit-config: &unit-config
environment:
TEST_PHP_ARGS: -q
REPORT_EXIT_STATUS: 1
RUN_EXTENSION_TESTS: 1
SUDO_CMD: "sudo"
steps:
- checkout
- run:
name: Install build tools
command: |
autoconf -V || \
(
$SUDO_CMD apt-get update -y && \
$SUDO_CMD apt-get install -y -q --no-install-recommends \
build-essential \
g++ \
gcc \
libc-dev \
make \
autoconf \
git \
unzip
)
- run:
name: Extension unit tests
command: |
if [ $RUN_EXTENSION_TESTS -eq "1" ]; then
pushd ext
phpize
./configure --enable-opencensus
make test || ((find . -name '*.diff' | xargs cat) && false)
$SUDO_CMD make install
popd
else
echo "Skipping extension tests"
fi
# Download and cache dependencies
- restore_cache:
keys:
- v1-dependencies-{{ checksum "composer.json" }}
# fallback to using the latest cache if no exact match is found
- v1-dependencies-
- run:
name: Install composer packages
command: composer install -n --prefer-dist
- save_cache:
paths:
- ./vendor
key: v1-dependencies-{{ checksum "composer.json" }}
- run:
name: Enable E_ALL error reporting for strict testing
command: $SUDO_CMD cp config/php.ini /usr/local/etc/php
- run:
name: PHP Code Style
command: vendor/bin/phpcs --standard=./phpcs-ruleset.xml
- run:
name: PHP unit tests
command: vendor/bin/phpunit
- run:
name: PHP unit tests with extension
command: |
if [ $RUN_EXTENSION_TESTS -eq "1" ]; then
php -d extension=opencensus.so vendor/bin/phpunit
else
echo "Skipping units tests with extension"
fi
version: 2
jobs:
php56:
<<: *unit-config
docker:
- image: circleci/php:5.6-node
environment:
RUN_EXTENSION_TESTS: 0
SUDO_CMD: "sudo"
php56-zts:
<<: *unit-config
docker:
- image: circleci/php:5.6-zts-node
environment:
RUN_EXTENSION_TESTS: 0
SUDO_CMD: "sudo"
php70:
<<: *unit-config
docker:
- image: circleci/php:7.0-node
php70-zts:
<<: *unit-config
docker:
- image: circleci/php:7.0-zts-node
php71:
<<: *unit-config
docker:
- image: circleci/php:7.1-node
php71-zts:
<<: *unit-config
docker:
- image: circleci/php:7.1-zts-node
php72:
<<: *unit-config
docker:
- image: circleci/php:7.2-node
php72-zts:
<<: *unit-config
docker:
- image: circleci/php:7.2-zts-node
php70-32bit:
<<: *unit-config
docker:
- image: gcr.io/php-stackdriver/php70-32bit
environment:
TEST_PHP_ARGS: -q
REPORT_EXIT_STATUS: 1
RUN_EXTENSION_TESTS: 1
SUDO_CMD: ""
php71-32bit:
<<: *unit-config
docker:
- image: gcr.io/php-stackdriver/php71-32bit
environment:
TEST_PHP_ARGS: -q
REPORT_EXIT_STATUS: 1
RUN_EXTENSION_TESTS: 1
SUDO_CMD: ""
php71-debug:
<<: *unit-config
docker:
- image: gcr.io/php-stackdriver/php71-debug
environment:
TEST_PHP_ARGS: -q
REPORT_EXIT_STATUS: 1
RUN_EXTENSION_TESTS: 1
SUDO_CMD: ""
integration:
docker:
- image: circleci/php:7.2-node
- image: memcached
- image: mysql:5.7
environment:
MYSQL_USER: mysql
MYSQL_PASSWORD: mysql
MYSQL_DATABASE: mysqldb
MYSQL_RANDOM_ROOT_PASSWORD: yes
- image: postgres:9.6
environment:
POSTGRES_PASSWORD: pgsql
POSTGRES_USER: postgres
steps:
- checkout
- run:
name: Install build tools
command: |
sudo apt-get update -y
sudo apt-get install -y -q --no-install-recommends \
build-essential \
g++ \
gcc \
libc-dev \
libpqxx-dev \
zlib1g-dev \
make \
autoconf \
git \
unzip
- run:
name: Install opencensus extension
command: |
cd ext
phpize
./configure --enable-opencensus
sudo make install
sudo docker-php-ext-enable opencensus
- run:
name: Install grpc extension
command: |
sudo pecl install grpc
sudo docker-php-ext-enable grpc
- run:
name: Install memcached extension
command: |
sudo apt-get install -y -q --no-install-recommends \
libmemcached11 libmemcached-dev zlib1g-dev zlib1g
sudo pecl install memcached <<<''
sudo docker-php-ext-enable memcached
- run:
name: Install pdo_mysql extension
command: sudo docker-php-ext-install pdo_mysql
- run:
name: Install mysqli extension
command: sudo docker-php-ext-install mysqli
- run:
name: Install pgsql extension
command: sudo docker-php-ext-install pgsql
- run:
name: Curl test
command: tests/integration/curl/test.sh
- run:
name: Grpc test
command: tests/integration/grpc/test.sh
- run:
name: Guzzle 5 test
command: tests/integration/guzzle5/test.sh
- run:
name: Guzzle 6 test
command: tests/integration/guzzle6/test.sh
- run:
name: Laravel test
command: tests/integration/laravel/test.sh
- run:
name: Memcached test
command: tests/integration/memcached/test.sh
- run:
name: Pgsql test
command: tests/integration/pgsql/test.sh
- run:
name: Symfony 4 test
command: tests/integration/symfony4/test.sh
environment:
DATABASE_URL: mysql://mysql:[email protected]:3306/mysqldb
- run:
name: Wordpress test
command: tests/integration/wordpress/test.sh
environment:
DB_HOST: 127.0.0.1
DB_USERNAME: mysql
DB_PASSWORD: mysql
DB_DATABASE: mysqldb
workflows:
version: 2
units:
jobs:
- php56
- php56-zts
- php70
- php70-zts
- php71
- php71-zts
- php72
- php72-zts
- php70-32bit
- php71-32bit
- php71-debug
- integration