|
| 1 | +name: "CI" |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - master |
| 7 | + pull_request: |
| 8 | + |
| 9 | +jobs: |
| 10 | + phpunit: |
| 11 | + name: "PHPUnit" |
| 12 | + runs-on: "ubuntu-latest" |
| 13 | + env: |
| 14 | + SYMFONY_REQUIRE: ${{matrix.symfony-require}} |
| 15 | + SYMFONY_DEPRECATIONS_HELPER: ${{matrix.symfony-deprecations-helper}} |
| 16 | + |
| 17 | + strategy: |
| 18 | + fail-fast: false |
| 19 | + matrix: |
| 20 | + include: |
| 21 | + # Minimum supported Symfony version and lowest PHP version |
| 22 | + - dependencies: "php-http/guzzle7-adapter" |
| 23 | + php-version: "7.3" |
| 24 | + dependency-versions: "lowest" |
| 25 | + symfony-deprecations-helper: "weak" |
| 26 | + |
| 27 | + # Test the latest stable release |
| 28 | + - dependencies: "php-http/guzzle7-adapter php-http/vcr-plugin:^1.0@dev" |
| 29 | + php-version: "7.3" |
| 30 | + symfony-deprecations-helper: "weak" |
| 31 | + - dependencies: "php-http/guzzle6-adapter" |
| 32 | + php-version: "7.4" |
| 33 | + symfony-deprecations-helper: "weak" |
| 34 | + - dependencies: "php-http/guzzle6-adapter" |
| 35 | + php-version: "8.0" |
| 36 | + symfony-deprecations-helper: "weak" |
| 37 | + |
| 38 | + # Test with httplug 1.x clients |
| 39 | + - dependencies: "php-http/buzz-adapter:^1.0 php-http/guzzle6-adapter:^1.1.1 php-http/react-adapter:^0.2.1 php-http/socket-client:^1.0" |
| 40 | + php-version: "7.3" |
| 41 | + symfony-deprecations-helper: "weak" |
| 42 | + # Test with httplug 2.x clients |
| 43 | + - dependencies: "php-http/guzzle7-adapter php-http/curl-client:^2.0.0 php-http/vcr-plugin:^1.0@dev" |
| 44 | + php-version: "7.3" |
| 45 | + symfony-deprecations-helper: "weak" |
| 46 | + |
| 47 | + # Latest commit to master |
| 48 | + - dependencies: "php-http/guzzle7-adapter php-http/vcr-plugin:^1.0@dev" |
| 49 | + php-version: "8.0" |
| 50 | + stability: "dev" |
| 51 | + symfony-deprecations-helper: "weak" |
| 52 | + - dependencies: "php-http/guzzle7-adapter" |
| 53 | + php-version: "8.0" |
| 54 | + stability: "dev" |
| 55 | + symfony-deprecations-helper: "weak" |
| 56 | + |
| 57 | + # Test maintained versions of Symfony |
| 58 | + - dependencies: "php-http/guzzle6-adapter" |
| 59 | + symfony-require: "3.4.*" |
| 60 | + php-version: "7.3" |
| 61 | + symfony-deprecations-helper: "weak" |
| 62 | + - dependencies: "php-http/guzzle7-adapter symfony/http-client:^4.4" |
| 63 | + symfony-require: "4.4.*" |
| 64 | + php-version: "7.3" |
| 65 | + symfony-deprecations-helper: "weak" |
| 66 | + - dependencies: "php-http/guzzle7-adapter symfony/http-client:^5.0" |
| 67 | + symfony-require: "5.4.*" |
| 68 | + php-version: "7.3" |
| 69 | + symfony-deprecations-helper: "weak" |
| 70 | + |
| 71 | + steps: |
| 72 | + - name: "Checkout" |
| 73 | + uses: "actions/checkout@v2" |
| 74 | + with: |
| 75 | + fetch-depth: 2 |
| 76 | + |
| 77 | + - name: "Install PHP with PCOV" |
| 78 | + uses: "shivammathur/setup-php@v2" |
| 79 | + with: |
| 80 | + php-version: "${{ matrix.php-version }}" |
| 81 | + coverage: "pcov" |
| 82 | + ini-values: "zend.assertions=1" |
| 83 | + |
| 84 | + - name: "Enforce using stable dependencies" |
| 85 | + run: "composer config minimum-stability stable" |
| 86 | + if: "${{ matrix.stability == 'stable' }}" |
| 87 | + |
| 88 | + - name: "Install dependencies" |
| 89 | + run: "composer require --no-progress --no-scripts --no-plugins symfony/flex ${{ matrix.dependencies }}" |
| 90 | + |
| 91 | + - name: "Install dependencies with Composer" |
| 92 | + uses: "ramsey/composer-install@v1" |
| 93 | + with: |
| 94 | + dependency-versions: "${{ matrix.dependencies }}" |
| 95 | + composer-options: "${{ matrix.composer-options }}" |
| 96 | + |
| 97 | + - name: "Run PHPUnit" |
| 98 | + run: "composer test" |
0 commit comments