6
6
7
7
jobs :
8
8
9
- redis-tests :
10
- name : Redis tests
9
+ integration :
10
+ name : Integration
11
11
runs-on : ubuntu-latest
12
+
12
13
strategy :
13
14
matrix :
14
- php : [7.2, 7.3, 7.4]
15
+ php : ['5.5', '7.2', '7.3', '7.4']
16
+
15
17
services :
16
18
redis :
17
19
image : redis
@@ -26,27 +28,49 @@ jobs:
26
28
- 7003:7003
27
29
- 7004:7004
28
30
- 7005:7005
29
- container :
30
- image : jakzal/phpqa:php${{ matrix.php }}
31
+
31
32
steps :
32
- - uses : actions/checkout@v2
33
- # Install system dependencies
34
- - run : ' apt-get update && apt-get install -y autoconf file g++ gcc libc-dev pkg-config re2c'
35
- - run : ' pecl install redis && docker-php-ext-enable redis'
36
- # Configure PHP & Composer
37
- - run : echo memory_limit = -1 >> /usr/local/etc/php/conf.d/custom.ini
38
- - run : ' [ -d ~/.composer ] || mkdir ~/.composer'
39
- - run : cp .github/composer-config.json ~/.composer/config.json
40
- # Configure the build
41
- - run : echo "::set-env name=SYMFONY_VERSION::$(cat composer.json | grep '^ *\"dev-master\". *\"[1-9]' | grep -o '[0-9.]*')"
42
- - run : echo "::set-env name=COMPOSER_ROOT_VERSION::$SYMFONY_VERSION.x-dev"
43
- # Install dependencies
44
- - run : composer global require --no-progress --no-scripts --no-plugins symfony/flex dev-master
45
- - run : composer update --no-progress --no-suggest --ansi
46
- - run : ./phpunit install
47
- # Run tests
48
- - run : ./phpunit --group redis --verbose
49
- env :
50
- REDIS_HOST : redis
51
- REDIS_CLUSTER_HOSTS : ' redis-cluster:7000 redis-cluster:7001 redis-cluster:7002 redis-cluster:7003 redis-cluster:7004 redis-cluster:7005'
33
+ - name : Checkout
34
+ uses : actions/checkout@v2
35
+
36
+ - name : Setup PHP
37
+ uses : shivammathur/setup-php@v2
38
+ with :
39
+ coverage : " none"
40
+ extensions : " redis"
41
+ ini-values : " memory_limit=-1"
42
+ php-version : " ${{ matrix.php }}"
43
+
44
+ - name : Configure composer
45
+ run : |
46
+ ([ -d ~/.composer ] || mkdir ~/.composer) && cp .github/composer-config.json ~/.composer/config.json
47
+ SYMFONY_VERSION=$(cat composer.json | grep '^ *\"dev-master\". *\"[1-9]' | grep -o '[0-9.]*')
48
+ echo "::set-env name=SYMFONY_VERSION::$SYMFONY_VERSION"
49
+ echo "::set-env name=COMPOSER_ROOT_VERSION::$SYMFONY_VERSION.x-dev"
50
+
51
+ - name : Determine composer cache directory
52
+ id : composer-cache
53
+ run : echo "::set-output name=directory::$(composer config cache-dir)"
54
+
55
+ - name : Cache composer dependencies
56
+ uses : actions/cache@v1
57
+ with :
58
+ path : ${{ steps.composer-cache.outputs.directory }}
59
+ key : ${{ matrix.php }}-composer-
60
+ restore-keys : ${{ matrix.php }}-composer-
61
+
62
+ - name : Install Symfony Flex
63
+ run : composer global require --no-progress --no-scripts --no-plugins symfony/flex dev-master
64
+ if : matrix.php != 5.5 && matrix.php != 5.6
65
+
66
+ - name : Install dependencies
67
+ run : |
68
+ composer update --no-progress --no-suggest --ansi
69
+ ./phpunit install
70
+
71
+ - name : Run tests
72
+ run : ./phpunit --group redis
73
+ env :
74
+ REDIS_HOST : localhost
75
+ REDIS_CLUSTER_HOSTS : ' localhost:7000 localhost:7001 localhost:7002 localhost:7003 localhost:7004 localhost:7005'
52
76
0 commit comments