6868 # Will still run for each push to bump-meilisearch-v*
6969 if : github.event_name != 'pull_request' || !startsWith(github.base_ref, 'bump-meilisearch-v')
7070 runs-on : ubuntu-latest
71- name : integration-tests (PHP ${{ matrix.php-version }}) (${{ matrix.http-client }})
71+ name : integration-tests (PHP ${{ matrix.php-version }})
7272 services :
7373 meilisearch :
7474 image : getmeili/meilisearch:latest
8080 strategy :
8181 matrix :
8282 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'
9183
9284 steps :
9385 - uses : actions/checkout@v4
@@ -101,79 +93,18 @@ jobs:
10193 - name : Validate composer.json and composer.lock
10294 run : composer validate
10395
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-
12796 - name : Install dependencies
12897 uses : ramsey/composer-install@v3
12998
13099 - 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
132101
133102 - name : Upload coverage file
134103 uses : actions/upload-artifact@v4
135104 with :
136- name : ' phpunit-${{ matrix.php-version }}-${{ matrix.http-client }}- coverage'
105+ name : ' phpunit-${{ matrix.php-version }}-coverage'
137106 path : ' coverage*.xml'
138107
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-
177108 upload-coverage :
178109 name : Upload coverage to Codecov
179110 runs-on : ubuntu-latest
0 commit comments