@@ -15,49 +15,47 @@ jobs:
1515 matrix :
1616 php : ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0']
1717
18+ services :
19+ redis :
20+ image : redis:6.0.0
21+ ports :
22+ - 6379:6379
23+ redis-cluster :
24+ image : grokzen/redis-cluster:5.0.4
25+ ports :
26+ - 7000:7000
27+ - 7001:7001
28+ - 7002:7002
29+ env :
30+ STANDALONE : 1
31+ memcached :
32+ image : memcached:1.6.5
33+ ports :
34+ - 11211:11211
35+ mongodb :
36+ image : mongo
37+ ports :
38+ - 27017:27017
39+
1840 steps :
1941 - name : Set up PHP
2042 uses : shivammathur/setup-php@2.7.0
2143 with :
2244 php-version : ${{ matrix.php }}
2345 coverage : none
46+ tools : pecl
47+ extensions : redis, memcached, mongodb, apcu, apc
48+ ini-values : apc.enable_cli=1
2449
2550 - name : Checkout code
2651 uses : actions/checkout@v2
2752
28- - name : Download phpunit
29- run : |
30- rm composer.*
31- composer init --no-interaction --name "php-cache/cache"
32-
33- echo ::group::Download
34- composer require symfony/phpunit-bridge
35- echo ::endgroup::
36-
37- echo ::group::Install
38- ./vendor/bin/simple-phpunit install
39- echo ::endgroup::
40-
41- - name : Modify composer.json
42- run : |
43- CURRENT_DIR=$(pwd)
44- for PACKAGE in $(find src -maxdepth 4 -type f -name phpunit.xml.dist -printf '%h\n' | sort)
45- do
46- echo ::group::mi$PACKAGE
47- echo "$CURRENT_DIR/$PACKAGE"
48- cd "$CURRENT_DIR/$PACKAGE"
49-
50- sed -i -re 's/"require": \{/"minimum-stability": "dev","prefer-stable": true,"require": \{/' composer.json
51- cat composer.json
52-
53- echo ::endgroup::
54- done
55-
5653 - name : Download dependencies
5754 env :
5855 PHP_VERSION : ${{ matrix.php }}
5956 run : |
6057 CURRENT_DIR=$(pwd)
58+ ok=0
6159 for PACKAGE in $(find src -maxdepth 4 -type f -name phpunit.xml.dist -printf '%h\n' | sort)
6260 do
6361 echo ::group::$PACKAGE
@@ -69,21 +67,31 @@ jobs:
6967 COMPOSER_OPTIONS=' --ignore-platform-req=php'
7068 fi
7169 composer update --no-interaction --prefer-dist --optimize-autoloader $COMPOSER_OPTIONS || localExit=1
70+ ok=$(( $localExit || $ok ))
7271 echo ::endgroup::
7372 if [ $localExit -ne 0 ]; then
7473 echo "::error::$PACKAGE error"
75- exit $localExit
7674 fi
7775 done
7876
77+ if [ $PHP_VERSION = '5.6' ]; then
78+ exit 0
79+ fi
80+
81+ exit $ok
82+
7983 - name : Run tests
8084 run : |
85+ CURRENT_DIR=$(pwd)
8186 ok=0
8287 for PACKAGE in $(find src -maxdepth 4 -type f -name phpunit.xml.dist -printf '%h\n' | sort)
8388 do
8489 echo ::group::$PACKAGE
90+ echo "$CURRENT_DIR/$PACKAGE"
91+ cd "$CURRENT_DIR/$PACKAGE"
92+
8593 localExit=0
86- ./vendor/bin/simple- phpunit -c ./$PACKAGE 2>&1 || localExit=1
94+ ./vendor/bin/phpunit 2>&1 || localExit=1
8795 ok=$(( $localExit || $ok ))
8896 echo ::endgroup::
8997 if [ $localExit -ne 0 ]; then
0 commit comments