File tree 1 file changed +19
-1
lines changed
1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change 37
37
ports :
38
38
- 3306/tcp
39
39
options : --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
40
+ redis :
41
+ image : redis
42
+ ports :
43
+ - 6379/tcp
44
+ options : >-
45
+ --health-cmd "redis-cli ping"
46
+ --health-interval 10s
47
+ --health-timeout 5s
48
+ --health-retries 5
40
49
41
50
strategy :
42
51
matrix :
53
62
- name : Install dependencies
54
63
run : |
55
64
sudo apt-get update -y \
56
- && sudo apt-get update -y && sudo apt-get install -y librrd-dev rrdtool
65
+ && sudo apt-get update -y && sudo apt-get install -y librrd-dev rrdtool redis-server
57
66
python -m pip install --upgrade pip
58
67
pip install -r requirements.txt
59
68
pip install -r test-requirements.txt
63
72
python setup.py develop
64
73
cd ../modoboa-webmail
65
74
python setup.py develop
75
+ echo "Testing redis connection"
76
+ redis-cli -h $REDIS_HOST -p $REDIS_PORT ping
77
+ env :
78
+ REDIS_HOST : localhost
79
+ REDIS_PORT : ${{ job.services.redis.ports[6379] }}
66
80
- name : Install postgres requirements
67
81
if : ${{ matrix.database == 'postgres' }}
68
82
run : |
84
98
MYSQL_HOST : 127.0.0.1
85
99
MYSQL_PORT : ${{ job.services.mysql.ports[3306] }} # get randomly assigned published port
86
100
MYSQL_USER : root
101
+ REDIS_HOST : localhost
102
+ REDIS_PORT : ${{ job.services.redis.ports[6379] }}
87
103
88
104
- name : Test with pytest and coverage
89
105
if : ${{ matrix.python-version == '3.10' && matrix.database == 'postgres' }}
99
115
MYSQL_HOST : 127.0.0.1
100
116
MYSQL_PORT : ${{ job.services.mysql.ports[3306] }} # get randomly assigned published port
101
117
MYSQL_USER : root
118
+ REDIS_HOST : localhost
119
+ REDIS_PORT : ${{ job.services.redis.ports[6379] }}
102
120
- name : Upload coverage result
103
121
if : ${{ matrix.python-version == '3.10' && matrix.database == 'postgres' }}
104
122
uses : actions/upload-artifact@v3
You can’t perform that action at this time.
0 commit comments