Skip to content

1 to 2

1 to 2 #193

name: "CI"
on:
push:
branches:
- '[0-9]+.x'
- '[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.x'
pull_request:
jobs:
phpunit:
name: "PHPUnit"
runs-on: "ubuntu-latest"
env:
SYMFONY_REQUIRE: ${{matrix.symfony-require}}
SYMFONY_DEPRECATIONS_HELPER: ${{matrix.symfony-deprecations-helper}}
strategy:
fail-fast: false
matrix:
include:
# Minimum supported Symfony version and lowest PHP version
- dependencies: "php-http/guzzle7-adapter php-http/discovery:^1.12"
php-version: "7.3"
dependency-versions: "lowest"
symfony-deprecations-helper: "weak"
stability: "stable"
# Test the latest stable release
- dependencies: "php-http/guzzle7-adapter php-http/vcr-plugin:^1.0@dev"
php-version: "7.3"
symfony-deprecations-helper: "weak"
- dependencies: "php-http/guzzle6-adapter"
php-version: "7.4"
symfony-deprecations-helper: "weak"
- dependencies: "php-http/guzzle7-adapter"
php-version: "8.0"
symfony-deprecations-helper: "weak"
- dependencies: "php-http/guzzle7-adapter"
php-version: "8.1"
symfony-deprecations-helper: "weak"
- dependencies: "php-http/guzzle7-adapter"
php-version: "8.2"
symfony-deprecations-helper: "weak"
- dependencies: "php-http/guzzle7-adapter"
php-version: "8.3"
symfony-deprecations-helper: "weak"
# Test with httplug 2.x clients
- dependencies: "php-http/guzzle7-adapter php-http/curl-client:^2.0.0 php-http/vcr-plugin:^1.0@dev php-http/socket-client:^2.0"
php-version: "7.3"
symfony-deprecations-helper: "weak"
# Latest commit to master
- dependencies: "php-http/guzzle7-adapter php-http/vcr-plugin:^1.0@dev"
php-version: "8.2"
stability: "dev"
symfony-deprecations-helper: "weak"
- dependencies: "php-http/guzzle7-adapter"
php-version: "8.2"
stability: "dev"
symfony-deprecations-helper: "weak"
# Test maintained versions of Symfony
- dependencies: "php-http/guzzle7-adapter symfony/http-client:^5.4"
symfony-require: "5.4.*"
php-version: "7.3"
symfony-deprecations-helper: "weak"
- dependencies: "php-http/guzzle7-adapter symfony/http-client:^6.0"
symfony-require: "6.3.*"
php-version: "8.2"
symfony-deprecations-helper: "weak"
- dependencies: "php-http/guzzle7-adapter symfony/http-client:^6.0"
symfony-require: "6.4.*"
php-version: "8.1"
symfony-deprecations-helper: "weak"
steps:
- name: "Checkout"
uses: "actions/checkout@v3"
with:
fetch-depth: 2
- name: "Install PHP with PCOV"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
coverage: "pcov"
ini-values: "zend.assertions=1"
- name: "Enforce using stable dependencies"
run: "composer config minimum-stability stable"
if: "${{ matrix.stability == 'stable' }}"
- name: "Add dependencies and enable flex"
run: |
composer require --no-update symfony/flex ${{ matrix.dependencies }}
composer config --no-plugins allow-plugins.symfony/flex true
- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v2"
with:
dependency-versions: "${{ matrix.dependency-versions }}"
composer-options: "${{ matrix.composer-options }}"
- name: "Run PHPUnit"
run: "composer test"