Merge pull request #4018 from neos/bugfix/5660-move-leads-to-duplicat… #281
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Server (PHP) | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ main, '[0-9]+.[0-9]' ] | |
| pull_request: | |
| branches: [ main, '[0-9]+.[0-9]' ] | |
| jobs: | |
| build: | |
| name: 'Lint and Test' | |
| runs-on: ubuntu-latest | |
| env: | |
| FLOW_CONTEXT: Testing | |
| DISTRIBUTION_FOLDER: neos-distribution | |
| PACKAGE_FOLDER: Neos.Neos.Ui | |
| defaults: | |
| run: | |
| working-directory: ${{ env.DISTRIBUTION_FOLDER }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - php-version: '8.2' | |
| neos-version: '9.0' | |
| - php-version: '8.3' | |
| neos-version: '9.0' | |
| services: | |
| mariadb: | |
| # see https://mariadb.com/kb/en/mariadb-server-release-dates/ | |
| # this should be a current release, e.g. the LTS version | |
| image: mariadb:10.6 | |
| env: | |
| MYSQL_USER: neos | |
| MYSQL_PASSWORD: neos | |
| MYSQL_DATABASE: neos_functional_testing | |
| MYSQL_ROOT_PASSWORD: neos | |
| ports: | |
| - "3306:3306" | |
| options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| path: ${{ env.PACKAGE_FOLDER }} | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php-version }} | |
| extensions: mbstring, xml, json, zlib, iconv, intl, pdo_sqlite, mysql | |
| - name: Checkout development distribution | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: neos/neos-development-distribution | |
| ref: ${{ matrix.neos-version }} | |
| path: ${{ env.DISTRIBUTION_FOLDER }} | |
| - name: Cache Composer packages | |
| uses: actions/cache@v4 | |
| timeout-minutes: 30 | |
| with: | |
| path: | | |
| ~/.cache/composer | |
| ${{ env.DISTRIBUTION_FOLDER }}/Packages | |
| key: php-${{ matrix.php-version }}-neos-${{ matrix.neos-version }}-${{ hashFiles('**/composer.json') }} | |
| restore-keys: php-${{ matrix.php-version }}-neos-${{ matrix.neos-version }}- | |
| - name: Prepare Neos.Neos.Ui Package for composer installation | |
| run: | | |
| cd "../${{ env.PACKAGE_FOLDER }}" | |
| # no "neos/neos-ui-compiled" because this job is just for PHP | |
| composer remove neos/neos-ui-compiled --no-update | |
| # install also export-ignore'd Test/ directory | |
| rm .gitattributes | |
| - name: Install and link composer dependencies | |
| run: | | |
| composer config --no-plugins allow-plugins.neos/composer-plugin true | |
| composer config repositories.package '{ "type": "path", "url": "../${{ env.PACKAGE_FOLDER }}", "options": { "symlink": false } }' | |
| composer require --no-update --no-interaction neos/neos-ui:@dev | |
| composer install --no-interaction --no-progress --prefer-dist | |
| - name: Linting | |
| run: | | |
| cd Packages/Application/Neos.Neos.Ui | |
| composer run lint | |
| - name: Run Unit tests | |
| run: | | |
| bin/phpunit -c Build/BuildEssentials/PhpUnit/UnitTests.xml Packages/Application/Neos.Neos.Ui/Tests/Unit/ | |
| - name: Run Functional tests | |
| run: | | |
| bin/phpunit -c Build/BuildEssentials/PhpUnit/FunctionalTests.xml Packages/Application/Neos.Neos.Ui/Tests/Functional | |
| - name: Setup Flow configuration | |
| run: | | |
| rm -f Configuration/Testing/Settings.yaml | |
| cat <<EOF >> Configuration/Testing/Settings.yaml | |
| Neos: | |
| Flow: | |
| persistence: | |
| backendOptions: | |
| host: '127.0.0.1' | |
| driver: pdo_mysql | |
| user: 'neos' | |
| password: 'neos' | |
| dbname: 'neos_functional_testing' | |
| EOF | |
| - name: Run Behavioral tests | |
| run: | | |
| FLOW_CONTEXT=Testing/Behat ./flow doctrine:migrate --quiet | |
| cd Packages/Application/Neos.Neos.Ui | |
| composer run test:behavioral | |
| - name: Show Flow logs and exceptions on failure | |
| if: ${{ failure() }} | |
| run: | | |
| for file in Data/Logs/*.log; do | |
| echo $file | |
| cat $file | |
| echo "\n" | |
| echo "\n" | |
| done | |
| if [ -d "Data/Logs/Exceptions" ]; then | |
| echo "Exceptions (Data/Logs/Exceptions)" | |
| for file in Data/Logs/Exceptions/*; do | |
| echo $file | |
| cat $file | |
| echo "\n" | |
| echo "\n" | |
| done | |
| fi |