Sylius/.github/workflows/ci_e2e-custom.yaml
Jacob Tobiasz 9d6088fe0c
[UPMERGE] 1.13 -> 2.0 (#15683)
This PR has been generated automatically.
For more details see
[upmerge_pr.yaml](/Sylius/Sylius/blob/1.13/.github/workflows/upmerge_pr.yaml).

**Remember!** The upmerge should always be merged with using `Merge pull
request` button.

In case of conflicts, please resolve them manually with usign the
following commands:
```
git fetch upstream
gh pr checkout 
git merge upstream/2.0 --no-commit
```

If you use other name for the upstream remote, please replace `upstream`
with the name of your remote pointing to the `Sylius/Sylius` repository.

Once the conflicts are resolved, please run `git merge --continue` and
change the commit title to
```
Resolve conflicts between 1.13 and 2.0
```
2023-12-26 09:32:39 +01:00

104 lines
4.5 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.2" ]
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@v3
with:
ref: ${{ inputs.branch }}
- name: "Checkout"
if: "${{ inputs.branch == '' }}"
uses: actions/checkout@v3
- 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: 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