Skip to content

v1.12.0-BETA.2

v1.12.0-BETA.2 #3755

Workflow file for this run

name: Build
on:
push: ~
pull_request: ~
release:
types: [created]
schedule:
-
cron: "0 1 * * 6" # Run at 1am every Saturday
workflow_dispatch: ~
jobs:
tests:
runs-on: ubuntu-latest
name: "PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, Persistence: ${{ matrix.persistence }}, Collections: ${{ matrix.collections }}"
env:
APP_ENV: ${{ matrix.app_env }}
strategy:
fail-fast: false
matrix:
php: ["8.1", "8.2", "8.3"]
pagerfanta: [""]
symfony: ["^5.4", "^6.4"]
persistence: ["^2.0", "^3.0"]
collections: ["^1.8", "^2.0"]
app_env: ["test"]
include:
- php: "8.1"
pagerfanta: "^3.7"
symfony: "^5.4"
app_env: "test"
- php: "8.3"
symfony: "^7.0"
app_env: "test_without_hateoas"
exclude:
- php: "8.1"
collections: "^2.0"
persistence: "^2.0"
- php: "8.2"
collections: "^2.0"
persistence: "^2.0"
- php: "8.3"
collections: "^2.0"
persistence: "^2.0"
- persistence: "^2.0"
symfony: "^6.4"
steps:
-
uses: actions/checkout@v2
-
name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
coverage: none
-
name: Restrict Symfony version
if: matrix.symfony != ''
run: |
composer global config --no-plugins allow-plugins.symfony/flex true
composer global require --no-progress --no-scripts --no-plugins "symfony/flex:^1.10"
composer config extra.symfony.require "${{ matrix.symfony }}"
(cd src/Component && composer config extra.symfony.require "${{ matrix.symfony }}")
-
name: Restrict Pagerfanta version
if: matrix.pagerfanta != ''
run: |
composer require "babdev/pagerfanta-bundle:${{ matrix.pagerfanta }}" --no-update --no-scripts
composer require "pagerfanta/pagerfanta:${{ matrix.pagerfanta }}" --dev --no-update --no-scripts
(cd src/Component && composer require "pagerfanta/core:${{ matrix.pagerfanta }}" --no-update --no-scripts)
-
name: Restrict doctrine/persistence version
if: matrix.persistence != ''
run: composer require "doctrine/persistence:${{ matrix.persistence }}" --no-update --no-scripts
-
name: Restrict doctrine/collections version
if: matrix.collections != ''
run: composer require "doctrine/collections:${{ matrix.collections }}" --no-update --no-scripts
-
name: Remove hateoas on Symfony 7
if: matrix.symfony == '^7.0'
run: composer remove --dev willdurand/hateoas-bundle --no-update --no-scripts
-
name: Install dependencies
run: |
composer update --no-scripts
(cd src/Component && composer update --no-scripts)
-
name: Prepare test application
run: |
(cd tests/Application && bin/console doctrine:database:create)
(cd tests/Application && bin/console doctrine:schema:create)
-
name: Run Psalm
run: vendor/bin/psalm --php-version=${{ matrix.php }}
-
name: Run analysis
run: |
composer analyse
(cd src/Component && composer validate --strict)
-
name: Run Phpspec tests
run: |
vendor/bin/phpspec run --ansi --no-interaction
(cd src/Component && vendor/bin/phpspec run --no-interaction)
(cd src/Component && vendor/bin/phpspec run --no-interaction --config legacy/phpspec.yml.dist)
-
name: Run PHPUnit tests
run: vendor/bin/phpunit --colors=always
-
name: Run lint container
run: (cd tests/Application && bin/console lint:container)
-
name: Run state machine Phpspec tests with winzou/state-machine package
if: ${{ true != contains( matrix.php, '8.2' ) }}
run: |
sed -i -e 's/state_machine_component: symfony/state_machine_component: winzou/g' tests/Application/config/packages/test/sylius_resource.yaml
(cd tests/Application && bin/console cache:clear)
vendor/bin/phpspec run --ansi --no-interaction
sed -i -e 's/state_machine_component: winzou/state_machine_component: symfony/g' tests/Application/config/packages/test/sylius_resource.yaml
-
name: Run state machine PHPUnit tests with winzou/state-machine package
run: |
sed -i -e 's/state_machine_component: symfony/state_machine_component: winzou/g' tests/Application/config/packages/test/sylius_resource.yaml
(cd tests/Application && bin/console cache:clear)
vendor/bin/phpunit --colors=always
sed -i -e 's/state_machine_component: winzou/state_machine_component: symfony/g' tests/Application/config/packages/test/sylius_resource.yaml
-
name: Run state machine Phpspec tests with symfony/workflow package
if: ${{ true != contains( matrix.php, '8.2' ) }}
run: |
sed -i -e 's/state_machine_component: winzou/state_machine_component: symfony/g' tests/Application/config/packages/test/sylius_resource.yaml
(cd tests/Application && bin/console cache:clear)
vendor/bin/phpspec run --ansi --no-interaction
sed -i -e 's/state_machine_component: symfony/state_machine_component: winzou/g' tests/Application/config/packages/test/sylius_resource.yaml
-
name: Run state machine PHPUnit tests with symfony/workflow package
run: |
sed -i -e 's/state_machine_component: winzou/state_machine_component: symfony/g' tests/Application/config/packages/test/sylius_resource.yaml
(cd tests/Application && bin/console cache:clear)
vendor/bin/phpunit --colors=always
sed -i -e 's/state_machine_component: symfony/state_machine_component: winzou/g' tests/Application/config/packages/test/sylius_resource.yaml
-
name: Run lint container without friendsofsymfony/rest-bundle willdurand/hateoas-bundle jms/serializer-bundle packages
if: matrix.app_env == 'test'
run: |
composer remove --dev friendsofsymfony/rest-bundle willdurand/hateoas-bundle jms/serializer-bundle --no-scripts
(cd tests/Application && bin/console cache:clear --env=test_without_fosrest)
(cd tests/Application && bin/console lint:container --env=test_without_fosrest)
composer require --dev friendsofsymfony/rest-bundle willdurand/hateoas-bundle jms/serializer-bundle --no-scripts
-
name: Run lint container without winzou/state-machine-bundle package
if: matrix.app_env == 'test'
run: |
composer remove --dev winzou/state-machine-bundle --no-scripts
(cd tests/Application && bin/console cache:clear --env=test_without_state_machine)
(cd tests/Application && bin/console lint:container --env=test_without_state_machine)
composer require winzou/state-machine-bundle --no-scripts
-
name: Run lint container without sylius/grid-bundle package
if: matrix.app_env == 'test'
run: |
composer remove sylius/grid-bundle --no-scripts --dev
(cd tests/Application && bin/console cache:clear --env=test_without_twig)
(cd tests/Application && bin/console lint:container --env=test_without_twig)
composer require "sylius/grid-bundle: ^1.11" --no-scripts --dev