@@ -3,44 +3,24 @@ version: 2.1
33workflows :
44 workflow :
55 jobs :
6- - test_5_5 :
7- name : PHP 5.5
8- - test-with-preinstalled-php :
9- name : PHP 5.6
10- docker-image : circleci/php:5.6
11- use-phpredis : false
12- - test-with-preinstalled-php :
13- name : PHP 7.0
14- docker-image : circleci/php:7.0
15- - test-with-preinstalled-php :
16- name : PHP 7.1
17- docker-image : circleci/php:7.1
18- - test-with-preinstalled-php :
19- name : PHP 7.2
20- docker-image : circleci/php:7.2
21- include-lowest-compatible-versions-test : false
22- # lowest "compatible" version of phpunit in 7.2 has a bug - https://github.com/sebastianbergmann/comparator/pull/30
236 - test-with-preinstalled-php :
247 name : PHP 7.3
25- docker-image : circleci/php:7.3
26- include-lowest-compatible-versions-test : false
8+ docker-image : cimg/php:7.3
279 - test-with-preinstalled-php :
2810 name : PHP 7.4
29- docker-image : circleci/php:7.4
30- include-lowest-compatible-versions-test : false
11+ docker-image : cimg/php:7.4
12+ # we currently dont support php 8.0.x due to a bug in php 8 with guzzle,
13+ # this bug is reolved in 8.1-alpha and later
14+ # - test-with-preinstalled-php:
15+ # name: PHP 8.0
16+ # docker-image: cimg/php:8.1
3117 - integration-test
3218
3319jobs :
3420 test-with-preinstalled-php :
3521 parameters :
3622 docker-image :
3723 type : string
38- use-phpredis :
39- type : boolean
40- default : true
41- include-lowest-compatible-versions-test :
42- type : boolean
43- default : true
4424
4525 docker :
4626 - image : <<parameters.docker-image>>
@@ -56,91 +36,20 @@ jobs:
5636 - run :
5737 name : install dependencies
5838 command : composer install --no-progress
59- - when :
60- condition : <<parameters.use-phpredis>>
61- steps :
62- - run :
63- name : setup phpredis
64- command : |
65- pecl config-set php_ini /usr/local/etc/php/php.ini
66- yes '' | sudo pecl install -f redis || true;
67- echo "extension=redis.so" | sudo tee -a /usr/local/etc/php/conf.d/redis.ini;
39+ - run : mkdir -p ~/phpunit
6840 - run :
6941 name : run tests with highest compatible dependency versions
70- command : vendor/bin/phpunit --log-junit ~/phpunit/junit.xml --coverage-text tests
71- - store_test_results :
72- path : ~/phpunit
73- - store_artifacts :
74- path : ~/phpunit
75- - when :
76- condition : <<parameters.include-lowest-compatible-versions-test>>
77- steps :
78- - run :
79- name : run tests with lowest compatible dependency versions
80- command : composer update --prefer-lowest --no-progress && vendor/bin/phpunit tests
81-
82- test_5_5 : # CircleCI doesn't provide a Docker image for 5.5
83- machine :
84- image : circleci/classic:latest # Ubuntu 14.04
85- steps :
86- - run :
87- name : install PHP and Composer
88- command : |
89- sudo apt-get update &&
90- sudo apt-get install circleci-php-5.5.36 &&
91- php -r "copy('https://getcomposer.org/installer', '/tmp/composer-setup.php');" &&
92- sudo php /tmp/composer-setup.php --install-dir=/usr/local/bin --version 1.10.16 --filename=composer
93- # Composer 2.0 doesn't work with the older versions of php-cs-fixer that support PHP 5.5
94- - run :
95- name : install Docker
96- command : |
97- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" &&
98- sudo apt-get -q update &&
99- sudo apt-cache policy docker-ce &&
100- sudo apt-get -qy install docker-ce
101- - run : sudo apt-get -qy install redis-server curl
102- - checkout
103- - run :
104- name : validate composer.json
105- command : composer validate
106- - run :
107- name : install current dependencies
108- command : composer install --no-progress
109- - run :
110- name : run php-cs-fixer
111- command : vendor/bin/php-cs-fixer fix --diff --dry-run --verbose
112- - run :
113- name : start DynamoDB
114- command : docker run -p 8000:8000 amazon/dynamodb-local
115- background : true
116- - run :
117- name : download Consul
118- command : wget https://releases.hashicorp.com/consul/0.8.0/consul_0.8.0_linux_amd64.zip
119- - run :
120- name : extract Consul
121- command : unzip consul_0.8.0_linux_amd64.zip
122- - run :
123- name : start Consul
124- command : ./consul agent -dev
125- background : true
126- - run :
127- name : wait on Consul
128- command : |
129- until $(curl --output /dev/null --silent --fail --request PUT --data 'test' http://localhost:8500/v1/kv/initchecker); do
130- echo 'still waiting on Consul...'; sleep 2;
131- done
132- timeout : 50
133- - run :
134- name : run tests
135- command : vendor/bin/phpunit --log-junit ~/phpunit/junit.xml --coverage-text tests
42+ command : php -d xdebug.mode=coverage vendor/bin/phpunit
43+ enviroment :
44+ XDEBUG_MODE : coverage
13645 - store_test_results :
13746 path : ~/phpunit
13847 - store_artifacts :
13948 path : ~/phpunit
14049
14150 integration-test :
14251 docker :
143- - image : circleci/php:5.6.34 -cli-jessie
52+ - image : circleci/php:7.3 -cli-stretch
14453 - image : redis
14554 steps :
14655 - checkout
15261 echo "extension=apcu.so" | sudo tee -a /usr/local/etc/php/conf.d/apcu.ini;
15362 echo "apc.enable_cli = 1" | sudo tee -a /usr/local/etc/php/conf.d/apcu.ini
15463 - run : composer update --no-progress
155- - run : vendor/bin/phpunit --log-junit ~/phpunit/junit.xml integration-tests/CachedRedisFeatureRequesterTest.php
64+ - run : mkdir -p ~/phpunit
65+ - run : vendor/bin/phpunit integration-tests/CachedRedisFeatureRequesterTest.php
15666 - store_test_results :
15767 path : ~/phpunit
15868 - store_artifacts :
0 commit comments