[BUGFIX] Check BackendUtility::getRecord before using it in array_merge #317
Workflow file for this run
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: 🏃 tests | |
| on: [ push, pull_request, workflow_call ] | |
| jobs: | |
| compute: | |
| uses: ./.github/workflows/compute.yml | |
| test: | |
| name: 'TYPO3: ${{ matrix.typo3 }} - PHP: ${{ matrix.php }}' | |
| needs: [ compute ] | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: ${{ fromJson(needs.compute.outputs.os) }} | |
| php: ${{ fromJson(needs.compute.outputs.php) }} | |
| typo3: ${{ fromJson(needs.compute.outputs.typo3) }} | |
| exclude: ${{ fromJson(needs.compute.outputs.exclude) }} | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Store Composer cache directory | |
| id: composer-cache | |
| run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | |
| - name: Store TYPO3 version | |
| id: version-cache | |
| env: | |
| TYPO3: ${{ matrix.typo3 }} | |
| run: echo "version=${TYPO3//[!0-9]/}" >> $GITHUB_OUTPUT | |
| - uses: actions/cache/restore@v4 | |
| id: restore-composer-cache | |
| with: | |
| path: ${{ steps.composer-cache.outputs.dir }} | |
| key: ${{ runner.os }}-composer-${{ matrix.typo3 }}-${{ matrix.php }} | |
| restore-keys: | | |
| ${{ runner.os }}-composer-${{ matrix.typo3 }}- | |
| ${{ runner.os }}-composer- | |
| - name: Set up PHP Version ${{ matrix.php }} | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: mbstring, intl, pdo_sqlite, pdo_mysql | |
| tools: composer:v2 | |
| - name: Environment Check | |
| run: | | |
| php --version | |
| composer --version | |
| mkdir -p .Log/coverage/ .Log/junit/ | |
| - name: Validate composer.json | |
| run: composer validate | |
| - name: Composer install | |
| run: composer update --with "typo3/cms-core:${{ matrix.typo3 }}" --no-interaction | |
| - name: Save composer cache | |
| uses: actions/cache/save@v4 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.dir }} | |
| key: ${{ steps.restore-composer-cache.outputs.cache-primary-key }} | |
| - name: Lint PHP | |
| run: php .Build/bin/parallel-lint --exclude .Build . | |
| - name: Unit Tests | |
| if: ${{ success() || failure() }} && ${{ hashFiles('Tests/Unit/') != '' }} | |
| run: .Build/bin/phpunit --bootstrap .Build/vendor/typo3/testing-framework/Resources/Core/Build/UnitTestsBootstrap.php --log-junit .Log/junit/unit_${{ steps.version-cache.outputs.version }}.xml --coverage-php .Log/coverage/unit_${{ steps.version-cache.outputs.version }}.cov --testsuite unit | |
| - name: Functional Tests | |
| if: ${{ success() || failure() }} && ${{ hashFiles('Tests/Functional/') != '' }} | |
| env: | |
| typo3DatabaseHost: '127.0.0.1' | |
| typo3DatabaseName: 'typo3' | |
| typo3DatabasePassword: 'root' | |
| typo3DatabaseUsername: 'root' | |
| run: | | |
| sudo /etc/init.d/mysql start | |
| mkdir -p .Build/public/typo3conf/ext/ | |
| if [ ! -L .Build/public/typo3conf/ext/content_defender ]; then ln -snvf ../../../../. .Build/public/typo3conf/ext/content_defender; fi | |
| find 'Tests/Functional' -wholename '*Test.php' | parallel --gnu 'echo ""; echo ""; echo "Running functional test suite {}"; HASH=${{ steps.version-cache.outputs.version }}_${{ matrix.php }}_$( echo {} | md5sum | cut -d " " -f 1); .Build/bin/phpunit --bootstrap .Build/vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTestsBootstrap.php --log-junit .Log/junit/functional_$HASH.xml --coverage-php .Log/coverage/functional_$HASH.cov {}' | |
| - name: Archive PHPUnit logs | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: phpunit-logs-${{ runner.os }}-${{ matrix.typo3 }}-${{ matrix.php }} | |
| path: .Log/* | |
| include-hidden-files: true | |
| retention-days: 1 |