mirror of
https://github.com/Sylius/Sylius.git
synced 2026-07-14 17:10:53 +00:00
93 lines
4 KiB
YAML
93 lines
4 KiB
YAML
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-symfony:
|
|
runs-on: ubuntu-latest
|
|
name: "Non-JS, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}, MySQL ${{ matrix.mysql }} (Unstable Dependencies)"
|
|
timeout-minutes: 45
|
|
continue-on-error: true
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
php: [ "8.1" ]
|
|
symfony: [ "^6.4" ]
|
|
mysql: [ "8.0" ]
|
|
|
|
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: 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 }}
|
|
|
|
- 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,@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&&~@mink:chromedriver&&~@todo&&~@cli" --suite-tags="@ui" || vendor/bin/behat --strict --no-interaction -vvv -f progress --tags="~@javascript&&~@mink:chromedriver&&~@todo&&~@cli" --suite-tags="@ui" --rerun
|
|
|
|
- name: Upload logs
|
|
uses: actions/upload-artifact@v3
|
|
if: failure()
|
|
with:
|
|
name: "Logs (non-JS, PHP ${{ matrix.php }}, Symfony ${{ matrix.symfony }}) [Unstable], MySQL ${{ matrix.mysql }})"
|
|
path: |
|
|
etc/build/
|
|
var/log
|
|
if-no-files-found: ignore
|