forked from snc/SncRedisBundle
-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (82 loc) · 2.55 KB
/
continuous-integration.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
name: "CI"
on:
push:
pull_request:
jobs:
phpunit:
name: "PHPUnit"
runs-on: "ubuntu-latest"
env:
SYMFONY_REQUIRE: "${{matrix.symfony-require}}"
SYMFONY_DEPRECATIONS_HELPER: "max[self]=0"
services:
redis-sentinel:
image: bitnami/redis-sentinel
env:
REDIS_MASTER_HOST: localhost
ports:
- 26379:26379
strategy:
fail-fast: false
matrix:
include:
- dependency-versions: "lowest"
php-version: "7.4"
php-extensions: "redis-5.3.0"
- symfony-require: "4.4.*"
php-version: "8.1"
php-extensions: "redis"
- symfony-require: "5.4.*"
php-version: "8.2"
php-extensions: "redis"
- symfony-require: "6.2.*"
php-version: "8.2"
php-extensions: "redis"
- symfony-require: "6.3.*"
php-version: "8.2"
php-extensions: "redis-phpredis/phpredis@develop"
steps:
- name: "Checkout"
uses: "actions/checkout@v3"
with:
fetch-depth: 2
- name: "Set up redis single node"
uses: "getong/redis-action@v1"
with:
redis password: "sncredis"
- name: "Set up redis cluster"
uses: "vishnudxb/redis-cluster@1.0.5"
with:
master1-port: 7000
master2-port: 7001
master3-port: 7002
- name: "Setup redis with ACL"
uses: shogo82148/actions-setup-redis@v1
with:
redis-version: "6.2"
redis-port: "8000"
auto-start: "true"
redis-conf: |
user default on -@all ~* >ARandomPassword
user snc_redis on +@all ~* >snc_password
- name: "Install redis"
run: |
sudo apt-get update
sudo apt-get install redis
- name: "Run redis"
run: |
redis-server --port 0 --unixsocket /tmp/redis.sock --daemonize yes
- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
extensions: "${{ matrix.php-extensions }},relay"
ini-values: "zend.assertions=1, max_execution_time=30"
- name: "Install symfony/flex"
run: "composer require --no-progress --no-scripts --no-plugins symfony/flex"
- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v2"
with:
dependency-versions: "${{ matrix.dependency-versions }}"
- name: "Run PHPUnit"
run: "vendor/bin/phpunit -v"