-
-
Notifications
You must be signed in to change notification settings - Fork 169
201 lines (198 loc) · 7.79 KB
/
daily-test.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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
name: Daily Test
on:
schedule:
- cron: "0 16 * * *" # 这个值是 UTC 时间,每天北京时间 0 点执行
push:
paths:
- ".github/workflows/daily-test.yml"
- ".github/docker-compose.yml"
- ".github/php.dockerfile"
- ".github/actions/ci-prepare"
pull_request:
paths:
- ".github/workflows/daily-test.yml"
- ".github/docker-compose.yml"
- ".github/php.dockerfile"
- ".github/actions/ci-prepare"
jobs:
daily-test-3_0:
name: 3.0_Linux PHP-${{ matrix.php }} Swoole-${{ matrix.swoole.version }} RoadRunner-${{ matrix.roadrunner }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [8.2]
swoole:
- version: master
roadrunner: [2.7.*]
env:
ENV_SERVICE: php
PHP_VERSION: ${{ matrix.php }}
SWOOLE_VERSION: ${{ matrix.swoole.version }}
MYSQL_DOCKER_VERSION: "8.0"
REDIS_SERVER_HOST: redis
ROADRUNNER_DOCKER_VERSION: ${{ matrix.roadrunner }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMPOSER_ENV: --ignore-platform-reqs
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache dependencies
uses: actions/cache@v4
with:
path: /tmp/base_cache/composer
key: ${{ runner.os }}-daily-test-3.0-composer-${{ matrix.php }}-${{ hashFiles('*/composer.json', 'src/Components/*/composer.json') }}
restore-keys: |
${{ runner.os }}-daily-test-3.0-composer-${{ matrix.php }}-
${{ runner.os }}-daily-test-3.0-composer-
- name: Prepare
uses: ./.github/actions/ci-prepare
with:
env: ${{ env.ENV_SERVICE }}
- name: Test
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test
- name: Test swoole
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-swoole
- name: Test workerman
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-workerman
- name: Test workerman-gateway
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-workerman-gateway
- name: Test roadrunner
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-roadrunner
- name: Test fpm
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-fpm
- name: Test jwt
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-jwt
- name: Test queue
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-queue
- name: Test amqp
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-amqp
- name: Test kafka
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-kafka
- name: Test grpc
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-grpc
- name: Test snowflake
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-snowflake
- name: Test mqtt
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-mqtt
- name: Test smarty
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-smarty
- name: Test pgsql
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-pgsql
- name: Test phar
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-phar
- name: Test connection-center
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-connection-center
- name: Test database
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-database
- name: Test model
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-model
- name: Print logs
if: failure()
run: docker exec ${ENV_SERVICE} php .github/print-logs.php
daily-test-2_1:
name: 2.1_Linux PHP-${{ matrix.php }} Swoole-${{ matrix.swoole.version }} RoadRunner-${{ matrix.roadrunner }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [8.2]
swoole:
- version: master
roadrunner: [2.7.*]
env:
ENV_SERVICE: php
PHP_VERSION: ${{ matrix.php }}
SWOOLE_VERSION: ${{ matrix.swoole.version }}
MYSQL_DOCKER_VERSION: "8.0"
REDIS_SERVER_HOST: redis
ROADRUNNER_DOCKER_VERSION: ${{ matrix.roadrunner }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COMPOSER_ENV: --ignore-platform-reqs
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: "2.1"
- name: Cache dependencies
uses: actions/cache@v4
with:
path: /tmp/base_cache/composer
key: ${{ runner.os }}-daily-test-2.1-composer-${{ matrix.php }}-${{ hashFiles('*/composer.json', 'src/Components/*/composer.json') }}
restore-keys: |
${{ runner.os }}-daily-test-2.1-composer-${{ matrix.php }}-
${{ runner.os }}-daily-test-2.1-composer-
- name: Prepare
uses: ./.github/actions/ci-prepare
with:
env: ${{ env.ENV_SERVICE }}
- name: Test
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test
- name: Test swoole
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-swoole
- name: Test workerman
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-workerman
- name: Test workerman-gateway
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-workerman-gateway
- name: Test roadrunner
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-roadrunner
- name: Test fpm
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-fpm
- name: Test jwt
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-jwt
- name: Test queue
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-queue
- name: Test amqp
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-amqp
- name: Test kafka
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-kafka
- name: Test grpc
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-grpc
- name: Test snowflake
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-snowflake
- name: Test mqtt
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-mqtt
- name: Test smarty
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-smarty
- name: Test pgsql
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-pgsql
- name: Test phar
if: ${{ env.test_prepared && always() }}
run: docker exec ${ENV_SERVICE} composer test-phar
- name: Print logs
if: failure()
run: docker exec ${ENV_SERVICE} php .github/print-logs.php