name: End-to-End (Custom) on: workflow_dispatch: ~ workflow_call: inputs: branch: description: "Branch" required: false type: string default: "" permissions: contents: read jobs: behat-no-js-unstable-dependencies: runs-on: ubuntu-latest name: "Non-JS, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}, Resource ${{ matrix.resource }}, Grid ${{ matrix.grid }} (Unstable Dependencies)" timeout-minutes: 45 continue-on-error: true strategy: fail-fast: false matrix: php: ["8.2"] symfony: ["^6.4"] mysql: ["8.0"] resource: ["^1.12@alpha"] grid: ["^1.13@alpha"] env: APP_ENV: test_cached DATABASE_URL: "mysql://root:root@127.0.0.1/sylius?charset=utf8mb4&serverVersion=${{ matrix.mysql }}" steps: - name: Set variables shell: bash env: BRANCH: ${{ inputs.branch }} run: | if [ "$BRANCH" == "1.12" ]; then echo "USE_LEGACY_POSTGRES_SETUP=yes" >> $GITHUB_ENV else echo "USE_LEGACY_POSTGRES_SETUP=no" >> $GITHUB_ENV fi - name: "Checkout (With Branch)" if: "${{ inputs.branch != '' }}" uses: actions/checkout@v4 with: ref: ${{ inputs.branch }} - name: "Checkout" if: "${{ inputs.branch == '' }}" uses: actions/checkout@v4 - name: Change minimum-stability to dev run: | composer config minimum-stability dev composer config prefer-stable true - name: Prepare manifest.json files run: | mkdir -p public/build/admin mkdir -p public/build/shop mkdir -p public/build/app/admin mkdir -p public/build/app/shop echo "{}" > public/build/admin/manifest.json echo "{}" > public/build/shop/manifest.json echo "{}" > public/build/app/admin/manifest.json echo "{}" > public/build/app/shop/manifest.json - name: Require SyliusResourceBundle version run: | composer require sylius/resource-bundle:${{ matrix.resource }} --no-update - name: Require SyliusGridBundle version run: | composer require sylius/grid-bundle:${{ matrix.grid }} --no-update - name: Build application uses: SyliusLabs/BuildTestAppAction@v2.2 with: build_type: "sylius" cache_key: "${{ github.run_id }}-${{ runner.os }}-${{ hashFiles('composer.json') }}-php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-" cache_restore_key: "${{ github.run_id }}-${{ runner.os }}-${{ hashFiles('composer.json') }}-php-${{ matrix.php }}-symfony-${{ matrix.symfony }}-" e2e: "yes" database_version: ${{ matrix.mysql }} legacy_postgresql_setup: ${{ env.USE_LEGACY_POSTGRES_SETUP }} php_version: ${{ matrix.php }} symfony_version: ${{ matrix.symfony }} node_version: "20.x" - name: Run PHPUnit continue-on-error: true run: vendor/bin/phpunit --colors=always - name: Run CLI Behat run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@cli&&~@todo" --suite-tags="@cli" || vendor/bin/behat --strict --no-interaction -vvv -f progress --tags="@cli&&~@todo" --suite-tags="@cli" --rerun - name: Run non-UI Behat run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="~@todo&&~@cli" --suite-tags="@api,@domain" || vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="~@todo&&~@cli" --suite-tags="@api,@domain" --rerun - name: Run non-JS Behat run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@mink:chromedriver&&~@todo&&~@cli" --suite-tags="@hybrid,@ui" || vendor/bin/behat --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@mink:chromedriver&&~@todo&&~@cli" --suite-tags="@hybrid,@ui" --rerun - name: Upload logs uses: actions/upload-artifact@v3 if: failure() with: name: "Logs (non-JS, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }}, Resource ${{ matrix.resource }}, Grid ${{ matrix.grid }})" path: | etc/build/ var/log if-no-files-found: ignore