68
68
# Will still run for each push to bump-meilisearch-v*
69
69
if : github.event_name != 'pull_request' || !startsWith(github.base_ref, 'bump-meilisearch-v')
70
70
runs-on : ubuntu-latest
71
- name : integration-tests (PHP ${{ matrix.php-version }}) (${{ matrix.http-client }})
71
+ name : integration-tests (PHP ${{ matrix.php-version }})
72
72
services :
73
73
meilisearch :
74
74
image : getmeili/meilisearch:latest
80
80
strategy :
81
81
matrix :
82
82
php-version : ['7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
83
- http-client : ['Guzzle-7', 'Guzzle-7-Adapter', 'Symfony-HttpClient', 'PHP-HTTP-CurlClient', 'Kriswallsmith-Buzz']
84
- exclude :
85
- - php-version : ' 7.4'
86
- http-client : ' Symfony-HttpClient'
87
- - php-version : ' 8.0'
88
- http-client : ' Symfony-HttpClient'
89
- - php-version : ' 8.1'
90
- http-client : ' Symfony-HttpClient'
91
83
92
84
steps :
93
85
- uses : actions/checkout@v4
@@ -101,79 +93,18 @@ jobs:
101
93
- name : Validate composer.json and composer.lock
102
94
run : composer validate
103
95
104
- - name : Switch to Guzzle7 Adapter
105
- if : matrix.http-client == 'Guzzle-7-Adapter'
106
- run : |
107
- sed -i 's/"guzzlehttp\/guzzle": "^[0-9]\+\.[0-9]\+\.[0-9]\+\",/"php-http\/guzzle7-adapter": "^1.0.0",/' composer.json
108
-
109
- - name : Switch to Symfony HttpClient
110
- if : matrix.http-client == 'Symfony-HttpClient'
111
- run : |
112
- sed -i 's/"guzzlehttp\/guzzle": "^[0-9]\+\.[0-9]\+\.[0-9]\+\",/"symfony\/http-client": "^7.1.1",/' composer.json
113
- sed -i 's/"http-interop\/http-factory-guzzle": "^[0-9]\+\.[0-9]\+\.[0-9]\+\",/"nyholm\/psr7": "^1.8.1",/' composer.json
114
-
115
- - name : Switch to PHP HTTP CurlClient
116
- if : matrix.http-client == 'PHP-HTTP-CurlClient'
117
- run : |
118
- sed -i 's/"guzzlehttp\/guzzle": "^[0-9]\+\.[0-9]\+\.[0-9]\+\",/"php-http\/curl-client": "^2.3.2",/' composer.json
119
- sed -i 's/"http-interop\/http-factory-guzzle": "^[0-9]\+\.[0-9]\+\.[0-9]\+\",/"nyholm\/psr7": "^1.8.1",/' composer.json
120
-
121
- - name : Switch to Kriswallsmith Buzz
122
- if : matrix.http-client == 'Kriswallsmith-Buzz'
123
- run : |
124
- sed -i 's/"guzzlehttp\/guzzle": "^[0-9]\+\.[0-9]\+\.[0-9]\+\",/"kriswallsmith\/buzz": "^1.2.1",/' composer.json
125
- sed -i 's/"http-interop\/http-factory-guzzle": "^[0-9]\+\.[0-9]\+\.[0-9]\+\",/"nyholm\/psr7": "^1.8.1",/' composer.json
126
-
127
96
- name : Install dependencies
128
97
uses : ramsey/composer-install@v3
129
98
130
99
- name : Run test suite
131
- run : sh scripts/tests.sh --coverage-clover coverage-${{ matrix.php-version }}-${{ matrix.http-client }} .xml
100
+ run : sh scripts/tests.sh --coverage-clover coverage-${{ matrix.php-version }}.xml
132
101
133
102
- name : Upload coverage file
134
103
uses : actions/upload-artifact@v4
135
104
with :
136
- name : ' phpunit-${{ matrix.php-version }}-${{ matrix.http-client }}- coverage'
105
+ name : ' phpunit-${{ matrix.php-version }}-coverage'
137
106
path : ' coverage*.xml'
138
107
139
- test_php_7_guzzle_6 :
140
- # Will not run if the event is a PR to bump-meilisearch-v* (so a pre-release PR)
141
- # Will still run for each push to bump-meilisearch-v*
142
- if : github.event_name != 'pull_request' || !startsWith(github.base_ref, 'bump-meilisearch-v')
143
- runs-on : ubuntu-latest
144
- services :
145
- meilisearch :
146
- image : getmeili/meilisearch:latest
147
- ports :
148
- - 7700:7700
149
- env :
150
- MEILI_MASTER_KEY : masterKey
151
- MEILI_NO_ANALYTICS : true
152
-
153
- name : integration-tests (PHP 7.4 & Guzzle 6)
154
- steps :
155
- - name : Checkout code
156
- uses : actions/checkout@v4
157
-
158
- - name : Install PHP
159
- uses : shivammathur/setup-php@v2
160
- with :
161
- php-version : ' 7.4'
162
- coverage : none
163
-
164
- - name : Validate composer.json and composer.lock
165
- run : composer validate
166
-
167
- - name : Switch to Guzzle 6
168
- run : |
169
- sed -i 's/"guzzlehttp\/guzzle": "^[0-9]\+\.[0-9]\+\.[0-9]\+\",/"php-http\/guzzle6-adapter": "^2.0.2",/' composer.json
170
-
171
- - name : Install dependencies
172
- uses : ramsey/composer-install@v3
173
-
174
- - name : Run test suite - php-http/guzzle6-adapter
175
- run : sh scripts/tests.sh
176
-
177
108
upload-coverage :
178
109
name : Upload coverage to Codecov
179
110
runs-on : ubuntu-latest
0 commit comments