[RELASE] Crawler version 11.0.10 #1745
This file contains 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: | |
pull_request: | |
branches: | |
- "**" | |
push: | |
branches: | |
- "v11.x" | |
jobs: | |
Unit: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
typo3: [ '^10.4', '^11.5' ] | |
php: [ '7.4' ] | |
mysql: ['5.7'] | |
include: | |
- typo3: ^11.5 | |
php: 8.0 | |
mysql: 5.7 | |
- typo3: ^11.5 | |
php: 8.1 | |
mysql: 5.7 | |
steps: | |
- name: Set up MySQL ${{ matrix.mysql }} | |
uses: mirromutth/[email protected] | |
with: | |
mysql version: ${{ matrix.mysql }} | |
mysql root password: 'root' | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up PHP Version ${{ matrix.php }} | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
tools: composer:v2 | |
- name: Environment Check | |
run: | | |
php --version | |
composer --version | |
- name: Validate composer.json and composer.lock | |
run: composer validate | |
- name: Install dependencies with nimut/typo3-complete:${{ matrix.typo3 }} | |
if: matrix.typo3 != 'dev-master' | |
run: | | |
composer require --dev nimut/typo3-complete:${{ matrix.typo3 }} --no-progress | |
git checkout composer.json | |
ln -nfs .Build/vendor/typo3/cms/typo3 typo3 | |
- name: Lint PHP | |
run: find . -name \*.php ! -path "./.Build/*" ! -path "./scripts/*" ! -path "./typo3_src/*" | parallel --gnu php -d display_errors=stderr -l {} > /dev/null \; | |
- name: Ensure Libs are installed too for non-composer | |
run: composer extension-create-libs | |
- name: Unit Tests | |
if: matrix.typo3 != 'dev-master' | |
run: | | |
export "UNIT_XML"=.Build/vendor/nimut/testing-framework/res/Configuration/UnitTests.xml | |
.Build/bin/phpunit --whitelist Classes --coverage-clover=unittest-coverage.clover --colors -c $UNIT_XML Tests/Unit | |
- name: Functional Tests | |
run: | | |
export "FUNCTIONAL_XML"=.Build/vendor/nimut/testing-framework/res/Configuration/FunctionalTests.xml | |
.Build/bin/phpunit --whitelist Classes --coverage-clover=functional-coverage.clover --colors -c $FUNCTIONAL_XML Tests/Functional --process-isolation | |
if: matrix.typo3 != 'dev-master' | |
env: | |
typo3DatabaseHost: 127.0.0.1 | |
typo3DatabaseName: typo3 | |
typo3DatabasePassword: root | |
typo3DatabaseUsername: root | |
- name: Tests for dev-master | |
run: | | |
export "FUNCTIONAL_XML"=.Build/vendor/nimut/testing-framework/res/Configuration/FunctionalTests.xml | |
export "UNIT_XML"=.Build/vendor/nimut/testing-framework/res/Configuration/UnitTests.xml | |
composer remove --dev typo3/testing-framework rector/rector | |
rm -rf composer.lock .Build | |
composer require --dev nimut/typo3-complete:dev-master saschaegerer/phpstan-typo3:"*" nimut/testing-framework:"*" | |
git checkout composer.json | |
ln -nfs .Build/vendor/typo3/cms/typo3 typo3 | |
.Build/bin/phpunit --whitelist Classes --colors -c $UNIT_XML Tests/Unit | |
.Build/bin/phpunit --whitelist Classes --colors -c $FUNCTIONAL_XML Tests/Functional --process-isolation | |
if: matrix.typo3 == 'dev-master' && matrix.php == '7.4' | |
env: | |
typo3DatabaseHost: 127.0.0.1 | |
typo3DatabaseName: typo3 | |
typo3DatabasePassword: root | |
typo3DatabaseUsername: root | |
- name: Upload coverage results to Scrutinizer | |
if: matrix.typo3 == '^10.4' && matrix.php == '7.4' | |
run: | | |
wget https://scrutinizer-ci.com/ocular.phar | |
php ocular.phar code-coverage:upload --format=php-clover unittest-coverage.clover | |
php ocular.phar code-coverage:upload --format=php-clover functional-coverage.clover |