Skip to content

Split tests into different matrices; fix highest/lowest dependencies #1139

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 27 commits into from
Feb 20, 2021
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
0ba34ed
Split tests into different matrices
andrewmy Feb 11, 2021
bae2a72
Add lowest and highest dependencies to the matrix
andrewmy Feb 11, 2021
cb27166
Bump some minimal deps
andrewmy Feb 11, 2021
86ba387
Bump
andrewmy Feb 11, 2021
01995e1
Trigger CI
andrewmy Feb 11, 2021
0ca2709
Drop ext-rdkafka 3
andrewmy Feb 11, 2021
f8d94a0
Bump doctrine-bundle
andrewmy Feb 16, 2021
502d2ea
Drop doctrine-bundle <2
andrewmy Feb 16, 2021
39f8afc
More bumps
andrewmy Feb 16, 2021
e4170fa
Retrigger CI
andrewmy Feb 16, 2021
72a0e0e
Bump google/cloud-pubsub
andrewmy Feb 17, 2021
20e3d2f
Improve Dockerfile for local work
andrewmy Feb 17, 2021
d2e4f39
Bump guzzle
andrewmy Feb 17, 2021
2d69640
Re-add php 8 and sf 5.2
andrewmy Feb 17, 2021
f1f873a
Remove old sf from php8; fix amqplib requirement
andrewmy Feb 17, 2021
fb348b1
Remove old sf from php8 in functional tests
andrewmy Feb 17, 2021
9e84178
Bump aws-sdk
andrewmy Feb 17, 2021
6268ab6
Back to clunky composer install for better caching
andrewmy Feb 17, 2021
6c7d6c2
Derp
andrewmy Feb 17, 2021
0909932
Re-bump doctrine bundle
andrewmy Feb 17, 2021
dd50b60
Bump amqp-interop and queue-interop
andrewmy Feb 17, 2021
a4b5657
Fix hanging wamp tests with lowest deps
andrewmy Feb 17, 2021
126cf15
Fix bunny on php 8
andrewmy Feb 17, 2021
956b73a
Fix hanging wamp tests
andrewmy Feb 18, 2021
594e516
Drop EOL Symfony versions
andrewmy Feb 18, 2021
47b4032
Fix cache on one of the non-test steps
andrewmy Feb 18, 2021
1160afe
Retrigger CI
andrewmy Feb 18, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
174 changes: 80 additions & 94 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -43,6 +43,18 @@ jobs:
PATTERNS: |
pkg/**/*.php
- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-cs-check-${{ hashFiles('**/composer.json') }}
restore-keys: |
composer-cs-check-
- uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
@@ -52,103 +64,42 @@ jobs:

- run: php ./bin/fix-symfony-version.php "5.2.*"

- uses: "ramsey/composer-install@v1"
- run: composer update --no-progress

- run: sed -i 's/525568/16777471/' vendor/kwn/php-rdkafka-stubs/stubs/constants.php

- run: ./bin/php-cs-fixer fix --config=.php_cs.php --no-interaction --dry-run --diff -v --path-mode=intersection -- ${{ env.GIT_DIFF_FILTERED }}
if: env.GIT_DIFF_FILTERED

tests:
unit_tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['7.4']
include:
- php: 7.3
symfony_version: 4.3.*
unit_tests: true
functional_tests: false
rdkafka_tests: false
prepare_container: false
- php: 7.3
symfony_version: 4.4.*
unit_tests: true
functional_tests: false
rdkafka_tests: false
prepare_container: false
- php: 7.3
symfony_version: 5.0.*
unit_tests: true
functional_tests: false
rdkafka_tests: false
prepare_container: false
- php: 7.4
symfony_version: 4.3.*
unit_tests: true
functional_tests: false
rdkafka_tests: false
prepare_container: false
- php: 7.4
symfony_version: 4.4.*
unit_tests: true
functional_tests: false
rdkafka_tests: false
prepare_container: false
- php: 7.4
symfony_version: 5.0.*
unit_tests: true
functional_tests: false
rdkafka_tests: false
prepare_container: false
- php: 7.4
symfony_version: 5.2.*
unit_tests: true
functional_tests: false
rdkafka_tests: false
prepare_container: false
- php: 7.3 # same as in the container
symfony_version: 4.3.*
unit_tests: false
functional_tests: true
rdkafka_tests: false
prepare_container: true
- php: 7.3 # same as in the container
symfony_version: 5.0.*
unit_tests: false
functional_tests: true
rdkafka_tests: false
prepare_container: true
- php: 7.3 # same as in the container
symfony_version: 4.3.*
unit_tests: false
functional_tests: false
rdkafka_tests: true
prepare_container: true
- php: "8.0"
symfony_version: 5.2.*
unit_tests: true
functional_tests: false
rdkafka_tests: false
prepare_container: false
- php: "8.0"
symfony_version: 5.2.*
unit_tests: false
functional_tests: true
rdkafka_tests: false
prepare_container: true
- php: "8.0"
symfony_version: 5.2.*
unit_tests: false
rdkafka_tests: true
prepare_container: true

name: PHP ${{ matrix.php }} tests on Sf ${{ matrix.symfony_version }}, unit=${{ matrix.unit_tests }}, func=${{ matrix.functional_tests }}, rdkafka=${{ matrix.rdkafka_tests }}
php: ['7.3', '7.4', '8.0']
symfony_version: ['4.4.*', '5.2.*']
dependencies: ['--prefer-lowest', '--prefer-dist']
exclude:
- php: '8.0'
symfony_version: '4.4.*'

name: PHP ${{ matrix.php }} unit tests on Sf ${{ matrix.symfony_version }}, deps=${{ matrix.dependencies }}

steps:
- uses: actions/checkout@v2

- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ matrix.php }}-${{ matrix.symfony_version }}-${{ matrix.dependencies }}-${{ hashFiles('**/composer.json') }}
restore-keys: |
composer-${{ matrix.php }}-${{ matrix.symfony_version }}-${{ matrix.dependencies }}-
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
@@ -158,20 +109,55 @@ jobs:

- run: php ./bin/fix-symfony-version.php "${{ matrix.symfony_version }}"

- uses: "ramsey/composer-install@v1"
- run: composer update --no-progress ${{ matrix.dependencies }}

- run: sed -i 's/525568/16777471/' vendor/kwn/php-rdkafka-stubs/stubs/constants.php

- run: bin/dev -b
env:
PHP_VERSION: "${{ matrix.php }}"
if: matrix.prepare_container

- run: bin/phpunit --exclude-group=functional
if: matrix.unit_tests

- run: bin/test.sh --exclude-group=rdkafka
if: matrix.functional_tests
functional_tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: ['7.3', '8.0'] # same as in the container
symfony_version: ['4.4.*', '5.2.*']
dependencies: ['--prefer-lowest', '--prefer-dist']
rdkafka_action: ['exclude-group', 'group']
exclude:
- php: '8.0'
symfony_version: '4.4.*'

name: PHP ${{ matrix.php }} functional tests on Sf ${{ matrix.symfony_version }}, rdkafka_action=${{ matrix.rdkafka_action }}, deps=${{ matrix.dependencies }}

steps:
- uses: actions/checkout@v2

- name: Get Composer Cache Directory
id: composer-cache
run: |
echo "::set-output name=dir::$(composer config cache-files-dir)"
- uses: actions/cache@v2
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: composer-${{ matrix.php }}-${{ matrix.symfony_version }}-${{ matrix.dependencies }}-${{ hashFiles('**/composer.json') }}
restore-keys: |
composer-${{ matrix.php }}-${{ matrix.symfony_version }}-${{ matrix.dependencies }}-
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: none
extensions: mongodb, redis, :xdebug
ini-values: memory_limit=2048M

- run: php ./bin/fix-symfony-version.php "${{ matrix.symfony_version }}"

- run: composer update --no-progress ${{ matrix.dependencies }}

- run: sed -i 's/525568/16777471/' vendor/kwn/php-rdkafka-stubs/stubs/constants.php

- run: bin/dev -b

- run: bin/test.sh --group=rdkafka
if: matrix.rdkafka_tests
- run: bin/test.sh --${{ matrix.rdkafka_action }}=rdkafka
67 changes: 35 additions & 32 deletions composer.json
Original file line number Diff line number Diff line change
@@ -20,53 +20,59 @@
"ext-amqp": "^1.9.3",
"ext-gearman": "^2.0",
"ext-mongodb": "^1.5",
"ext-rdkafka": "^3.0.3|^4.0|^5.0",
"ext-rdkafka": "^4.0|^5.0",

"queue-interop/amqp-interop": "^0.8",
"queue-interop/queue-interop": "^0.7|^0.8",
"bunny/bunny": "^0.2.4|^0.3|^0.4",
"php-amqplib/php-amqplib": "^2.7",
"queue-interop/amqp-interop": "^0.8.2",
"queue-interop/queue-interop": "^0.8.1",
"bunny/bunny": "^0.4|^0.5",
"php-amqplib/php-amqplib": "^2.12.1",
"doctrine/dbal": "^2.12",
"ramsey/uuid": "^2|^3.5|^4.0",
"psr/log": "^1",
"ramsey/uuid": "^3.5|^4",
"psr/log": "^1.1",
"psr/container": "^1",
"makasim/temp-file": "^0.2",
"google/cloud-pubsub": "^0.6.1|^1.0",
"doctrine/orm": "~2.4",
"google/cloud-pubsub": "^1.4.3",
"doctrine/orm": "^2.7.4",
"doctrine/persistence": "^1.3.3|^2.0",
"mongodb/mongodb": "^1.2",
"pda/pheanstalk": "^3",
"aws/aws-sdk-php": "^3.26",
"stomp-php/stomp-php": "^4|^5",
"pda/pheanstalk": "^3.1",
"aws/aws-sdk-php": "^3.155",
"stomp-php/stomp-php": "^4.5|^5",
"php-http/guzzle7-adapter": "^0.1.1",
"php-http/client-common": "^2.2.1",
"richardfullmer/rabbitmq-management-api": "^2.1.1",
"predis/predis": "^1.1",
"thruway/client": "^0.5.0",
"thruway/pawl-transport": "^0.5.0",
"thruway/client": "^0.5",
"thruway/pawl-transport": "^0.5.1",
"influxdb/influxdb-php": "^1.14",
"datadog/php-datadogstatsd": "^1.3"
"datadog/php-datadogstatsd": "^1.3",
"guzzlehttp/guzzle": "^7.0.1",
"php-http/discovery": "^1.13",
"voryx/thruway-common": "^1.0.1",
"react/dns": "^1.0",
"react/event-loop": "^1.0"
},
"require-dev": {
"ext-pcntl": "*",
"phpunit/phpunit": "^9.5",
"phpstan/phpstan": "^0.12",
"queue-interop/queue-spec": "^0.6",
"symfony/browser-kit": "^3.4|^4",
"symfony/config": "^3.4|^4",
"symfony/process": "^3.4|^4",
"symfony/console": "^3.4|^4",
"symfony/dependency-injection": "^3.4|^4",
"symfony/event-dispatcher": "^3.4|^4",
"symfony/expression-language": "^3.4|^4",
"symfony/http-kernel": "^3.4|^4",
"symfony/filesystem": "^3.4|^4",
"symfony/framework-bundle": "^3.4|^4",
"queue-interop/queue-spec": "^0.6.2",
"symfony/browser-kit": "^4.3|^5",
"symfony/config": "^4.3|^5",
"symfony/process": "^4.3|^5",
"symfony/console": "^4.3|^5",
"symfony/dependency-injection": "^4.3|^5",
"symfony/event-dispatcher": "^4.3|^5",
"symfony/expression-language": "^4.3|^5",
"symfony/http-kernel": "^4.3|^5",
"symfony/filesystem": "^4.3|^5",
"symfony/framework-bundle": "^4.3|^5",
"symfony/yaml": "^4.3|^5",
"empi89/php-amqp-stubs": "*@dev",
"doctrine/doctrine-bundle": "~1.2|^2",
"doctrine/doctrine-bundle": "^2.0",
"doctrine/mongodb-odm-bundle": "^3.5|^4.3",
"alcaeus/mongo-php-adapter": "^1.0",
"kwn/php-rdkafka-stubs": "^1.0.2 | ^2.0",
"kwn/php-rdkafka-stubs": "^2.0.3",
"friendsofphp/php-cs-fixer": "^2",
"dms/phpunit-arraysubset-asserts": "^0.2.1",
"phpspec/prophecy-phpunit": "^2.0"
@@ -121,15 +127,12 @@
"platform": {
"ext-amqp": "1.9.3",
"ext-gearman": "2.0.3",
"ext-rdkafka": "3.3",
"ext-rdkafka": "4.0",
"ext-mongodb": "1.5",
"ext-bcmath": "1",
"ext-mbstring": "1",
"ext-mongo": "1.6.14"
},
"prefer-stable": true
},
"conflict": {
"doctrine/persistence": "<1.3.0"
}
}
3 changes: 3 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -25,6 +25,7 @@ RUN set -x && \
libgearman-dev \
php-pear \
make \
unzip \
&& \
pecl channel-update pecl.php.net && \
pecl install gearman && \
@@ -56,4 +57,6 @@ RUN chmod u+x /usr/local/bin/entrypoint.sh
RUN mkdir -p /mqdev
WORKDIR /mqdev

COPY --from=composer:2 /usr/bin/composer /usr/bin/composer

CMD /usr/local/bin/entrypoint.sh
6 changes: 3 additions & 3 deletions pkg/amqp-bunny/composer.json
Original file line number Diff line number Diff line change
@@ -7,16 +7,16 @@
"license": "MIT",
"require": {
"php": "^7.3|^8.0",
"queue-interop/amqp-interop": "^0.8",
"queue-interop/amqp-interop": "^0.8.2",
"queue-interop/queue-interop": "^0.8",
"bunny/bunny": "^0.4",
"bunny/bunny": "^0.4|^0.5",
"enqueue/amqp-tools": "^0.10"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"enqueue/test": "0.10.x-dev",
"enqueue/null": "0.10.x-dev",
"queue-interop/queue-spec": "^0.6"
"queue-interop/queue-spec": "^0.6.2"
},
"support": {
"email": "[email protected]",
4 changes: 2 additions & 2 deletions pkg/amqp-ext/composer.json
Original file line number Diff line number Diff line change
@@ -8,15 +8,15 @@
"require": {
"php": "^7.3|^8.0",
"ext-amqp": "^1.9.3",
"queue-interop/amqp-interop": "^0.8",
"queue-interop/amqp-interop": "^0.8.2",
"queue-interop/queue-interop": "^0.8",
"enqueue/amqp-tools": "^0.10"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"enqueue/test": "0.10.x-dev",
"enqueue/null": "0.10.x-dev",
"queue-interop/queue-spec": "^0.6",
"queue-interop/queue-spec": "^0.6.2",
"empi89/php-amqp-stubs": "*@dev"
},
"support": {
6 changes: 3 additions & 3 deletions pkg/amqp-lib/composer.json
Original file line number Diff line number Diff line change
@@ -7,16 +7,16 @@
"license": "MIT",
"require": {
"php": "^7.3|^8.0",
"php-amqplib/php-amqplib": "^2.10",
"queue-interop/amqp-interop": "^0.8",
"php-amqplib/php-amqplib": "^2.12.1",
"queue-interop/amqp-interop": "^0.8.2",
"queue-interop/queue-interop": "^0.8",
"enqueue/amqp-tools": "^0.10"
},
"require-dev": {
"phpunit/phpunit": "^9.5",
"enqueue/test": "0.10.x-dev",
"enqueue/null": "0.10.x-dev",
"queue-interop/queue-spec": "^0.6"
"queue-interop/queue-spec": "^0.6.2"
},
"support": {
"email": "[email protected]",
2 changes: 1 addition & 1 deletion pkg/amqp-tools/composer.json
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
"license": "MIT",
"require": {
"php": "^7.3|^8.0",
"queue-interop/amqp-interop": "^0.8",
"queue-interop/amqp-interop": "^0.8.2",
"queue-interop/queue-interop": "^0.8",
"enqueue/dsn": "^0.10"
},
Loading