diff --git a/.github/workflows/ci_e2e-custom.yaml b/.github/workflows/ci_e2e-custom.yaml index 9632ac6953..c7c02b879f 100644 --- a/.github/workflows/ci_e2e-custom.yaml +++ b/.github/workflows/ci_e2e-custom.yaml @@ -45,9 +45,14 @@ jobs: 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,@hybrid" || vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="~@todo&&~@cli" --suite-tags="@api,@domain,@hybrid" --rerun + - name: Run non-JS Behat - continue-on-error: true - run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@todo&&~@cli&&~@no-postgres" || vendor/bin/behat --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@todo&&~@cli&&~@no-postgres" --rerun + run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@todo&&~@cli" --suite-tags="@ui" || vendor/bin/behat --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@todo&&~@cli" --suite-tags="@ui" --rerun - name: Upload logs uses: actions/upload-artifact@v3 diff --git a/.github/workflows/ci_e2e-mariadb.yaml b/.github/workflows/ci_e2e-mariadb.yaml index cc6e7d5427..b15ea87f45 100644 --- a/.github/workflows/ci_e2e-mariadb.yaml +++ b/.github/workflows/ci_e2e-mariadb.yaml @@ -62,10 +62,13 @@ jobs: run: vendor/bin/phpunit --colors=always - name: Run CLI Behat - run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@cli&&~@todo" || vendor/bin/behat --strict --no-interaction -vvv -f progress --tags="@cli&&~@todo" --rerun + 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,@hybrid" || vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="~@todo&&~@cli" --suite-tags="@api,@domain,@hybrid" --rerun - name: Run non-JS Behat - run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@todo&&~@cli&&~@no-postgres" || vendor/bin/behat --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@todo&&~@cli&&~@no-postgres" --rerun + run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@todo&&~@cli" --suite-tags="@ui" || vendor/bin/behat --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@todo&&~@cli" --suite-tags="@ui" --rerun - name: Upload logs uses: actions/upload-artifact@v3 diff --git a/.github/workflows/ci_e2e-mysql.yaml b/.github/workflows/ci_e2e-mysql.yaml index 215a9ff637..cc7b2c0fa2 100644 --- a/.github/workflows/ci_e2e-mysql.yaml +++ b/.github/workflows/ci_e2e-mysql.yaml @@ -41,7 +41,7 @@ jobs: steps: - uses: actions/checkout@v3 - + - name: Restrict Twig if: matrix.twig == '^2.12' run: composer require --no-update --no-scripts --no-interaction "twig/twig:${{ matrix.twig }}" @@ -60,18 +60,21 @@ jobs: database_version: ${{ matrix.mysql }} php_version: ${{ matrix.php }} symfony_version: ${{ matrix.symfony }} - + - name: Test installer run: bin/console sylius:install --no-interaction -vvv - + - name: Run PHPUnit run: vendor/bin/phpunit --colors=always - name: Run CLI Behat - run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@cli&&~@todo" || vendor/bin/behat --strict --no-interaction -vvv -f progress --tags="@cli&&~@todo" --rerun + 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,@hybrid" || vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="~@todo&&~@cli" --suite-tags="@api,@domain,@hybrid" --rerun - name: Run non-JS Behat - run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@todo&&~@cli&&~@no-postgres" || vendor/bin/behat --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@todo&&~@cli&&~@no-postgres" --rerun + run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@todo&&~@cli" --suite-tags="@ui" || vendor/bin/behat --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@todo&&~@cli" --suite-tags="@ui" --rerun - name: Upload logs uses: actions/upload-artifact@v3 @@ -91,15 +94,15 @@ jobs: strategy: fail-fast: false matrix: ${{ fromJson(needs.get-matrix.outputs.matrix) }} - + env: APP_ENV: test_cached DATABASE_URL: "mysql://root:root@127.0.0.1/sylius?charset=utf8mb4&serverVersion=${{ matrix.mysql }}" - + steps: - uses: actions/checkout@v3 - + - name: Get Composer cache directory id: composer-cache run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT @@ -110,7 +113,7 @@ jobs: path: ${{ steps.composer-cache.outputs.dir }} key: "${{ github.run_id }}-${{ runner.os }}-${{ hashFiles('composer.json') }}-symfony-${{ matrix.symfony }}-api-platform-${{ matrix.api-platform }}" restore-keys: "${{ github.run_id }}-${{ runner.os }}-${{ hashFiles('composer.json') }}-symfony-${{ matrix.symfony }}-api-platform-${{ matrix.api-platform }}" - + - name: Restrict Twig if: matrix.twig == '^2.12' run: composer require --no-update --no-scripts --no-interaction "twig/twig:${{ matrix.twig }}" @@ -132,7 +135,7 @@ jobs: symfony_version: ${{ matrix.symfony }} - name: Run Behat - run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@javascript&&~@todo&&~@cli" || vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@javascript&&~@todo&&~@cli" --rerun + run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@javascript&&~@todo&&~@cli" --suite-tags="@ui" || vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@javascript&&~@todo&&~@cli" --suite-tags="@ui" --rerun - name: Upload logs uses: actions/upload-artifact@v3 diff --git a/.github/workflows/ci_e2e-pgsql.yaml b/.github/workflows/ci_e2e-pgsql.yaml index cb65581d5e..758fe8d1aa 100644 --- a/.github/workflows/ci_e2e-pgsql.yaml +++ b/.github/workflows/ci_e2e-pgsql.yaml @@ -40,7 +40,7 @@ jobs: steps: - uses: actions/checkout@v3 - + - name: Build application uses: SyliusLabs/BuildTestAppAction@v2.0 with: @@ -57,10 +57,13 @@ jobs: run: vendor/bin/phpunit --colors=always - name: Run CLI Behat - run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="@cli&&~@todo" || vendor/bin/behat --strict --no-interaction -vvv -f progress --tags="@cli&&~@todo" --rerun + 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&&~@no-postgres" --suite-tags="@api,@domain,@hybrid" || vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="~@todo&&~@cli&&~@no-postgres" --suite-tags="@api,@domain,@hybrid" --rerun - name: Run non-JS Behat - run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@todo&&~@cli&&~@no-postgres" || vendor/bin/behat --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@todo&&~@cli&&~@no-postgres" --rerun + run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@todo&&~@cli&&~@no-postgres" --suite-tags="@ui" || vendor/bin/behat --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@todo&&~@cli&&~@no-postgres" --suite-tags="@ui" --rerun - name: Upload logs uses: actions/upload-artifact@v3 diff --git a/.github/workflows/ci_e2e-unstable.yaml b/.github/workflows/ci_e2e-unstable.yaml index 3592d4aafa..591275f84d 100644 --- a/.github/workflows/ci_e2e-unstable.yaml +++ b/.github/workflows/ci_e2e-unstable.yaml @@ -46,14 +46,19 @@ jobs: database_version: ${{ matrix.mysql }} php_version: ${{ matrix.php }} symfony_version: ${{ matrix.symfony }} - + - name: Run PHPUnit continue-on-error: ${{ inputs.ignore-failure }} 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,@hybrid" || vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="~@todo&&~@cli" --suite-tags="@api,@domain,@hybrid" --rerun + - name: Run non-JS Behat - continue-on-error: ${{ inputs.ignore-failure }} - run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@todo&&~@cli&&~@no-postgres" || vendor/bin/behat --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@todo&&~@cli&&~@no-postgres" --rerun + run: vendor/bin/behat --colors --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@todo&&~@cli" --suite-tags="@ui" || vendor/bin/behat --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@todo&&~@cli" --suite-tags="@ui" --rerun - name: Upload logs uses: actions/upload-artifact@v3 diff --git a/behat.yml.dist b/behat.yml.dist index 950ed0ce65..acc2366f42 100644 --- a/behat.yml.dist +++ b/behat.yml.dist @@ -65,6 +65,8 @@ default: FriendsOfBehat\VariadicExtension: ~ + SyliusLabs\SuiteTagsExtension: ~ + gherkin: filters: tags: "~@todo&&~@cli" # CLI is excluded as it registers an error handler that mutes fatal errors diff --git a/composer.json b/composer.json index ad00ea0f28..a708889b4b 100644 --- a/composer.json +++ b/composer.json @@ -225,6 +225,7 @@ "rector/rector": "^0.12.20", "stripe/stripe-php": "^8.1", "sylius-labs/coding-standard": "^4.2", + "sylius-labs/suite-tags-extension": "~0.1", "symfony/browser-kit": "^5.4 || ^6.0", "symfony/debug-bundle": "^5.4 || ^6.0", "symfony/dotenv": "^5.4 || ^6.0",