@@ -11,22 +11,34 @@ defaults:
1111jobs :
1212
1313 tests :
14- name : Tests ( PHP ${{ matrix.php }} ${{ matrix.minimum_stability }}, Symfony LTS ${{ matrix.symfony_lts }})
14+ name : Tests on PHP ${{ matrix.php }} with ${{ matrix.implementation }}${{ matrix.name_suffix }}
1515 runs-on : ubuntu-20.04
1616 strategy :
1717 matrix :
1818 php : [ '5.4', '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1' ]
1919 minimum_stability : [ 'stable' ]
2020 symfony_lts : [ false ]
21+ name_suffix : [ '' ]
22+ implementation : [ 'http_kernel' ]
2123 include :
2224 - php : ' 8.0'
2325 minimum_stability : dev
26+ implementation : ' http_kernel'
27+ name_suffix : ' and dev deps'
2428 - php : ' 7.4'
2529 minimum_stability : dev
30+ implementation : ' http_kernel'
31+ name_suffix : ' and dev deps'
2632 - php : ' 7.2'
2733 symfony_lts : ' ^2'
34+ implementation : ' http_kernel'
35+ name_suffix : ' and Symfony 2'
2836 - php : ' 7.2'
2937 symfony_lts : ' ^3'
38+ implementation : ' http_kernel'
39+ name_suffix : ' and Symfony 3'
40+ - php : ' 8.0'
41+ implementation : http_client
3042 fail-fast : false
3143
3244 env :
@@ -60,14 +72,36 @@ jobs:
6072 run : |
6173 composer require --no-update --dev symfony/error-handler "^4.4 || ^5.0"
6274
75+ - name : Configure for HttpClient
76+ if : " ${{ matrix.implementation == 'http_client'}}"
77+ run : composer require --no-update --dev symfony/http-client:^4.4 symfony/mime:^4.4
78+
6379 - name : Install dependencies
6480 run : |
6581 composer update --no-interaction --prefer-dist
6682
83+ - name : Setup Mink test server
84+ if : " ${{ matrix.implementation == 'http_client'}}"
85+ run : |
86+ mkdir ./logs
87+ ./vendor/bin/mink-test-server &> ./logs/mink-test-server.log &
88+
89+ - name : Wait for browser & PHP to start
90+ if : " ${{ matrix.implementation == 'http_client'}}"
91+ run : |
92+ while ! nc -z localhost 8002 </dev/null; do echo Waiting for PHP server to start...; sleep 1; done
93+
94+
6795 - name : Run tests
96+ if : " ${{ matrix.implementation == 'http_kernel'}}"
6897 run : |
6998 vendor/bin/phpunit -v --coverage-clover=coverage.clover
7099
100+ - name : Run tests
101+ if : " ${{ matrix.implementation == 'http_client'}}"
102+ run : |
103+ vendor/bin/phpunit -c phpunit.http_client.xml -v --coverage-clover=coverage.clover
104+
71105 - name : Upload code coverage
72106 if : " ${{ matrix.php > '5.4' && matrix.symfony_lts == false }}"
73107 run : |
0 commit comments