Skip to content

CI: Add TYPO3 v13 to test matrix #1853

CI: Add TYPO3 v13 to test matrix

CI: Add TYPO3 v13 to test matrix #1853

Workflow file for this run

name: Tests
on:
pull_request:
branches:
- "**"
push:
branches:
- "main"
jobs:
Unit:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
typo3:
- '^12.4'
php:
- '8.1'
- '8.2'
- '8.3'
mysql:
- '8.0'
include:
- typo3: '^13.4'
php: '8.3'
mysql: '8.0'
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@v4
- 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 typo3/cms-core:${{ matrix.typo3 }}
if: matrix.typo3 != '^13.4'
run: |
composer require typo3/cms-core:${{ 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/*" ! -path "./Resources/*" | parallel --gnu php -d display_errors=stderr -l {} > /dev/null \;
- name: Unit Tests
if: matrix.typo3 != '^13.4'
run: |
export "UNIT_XML"=Tests/UnitTests.xml
.Build/bin/phpunit --coverage-filter Classes --coverage-clover=unittest-coverage.clover --colors -c $UNIT_XML Tests/Unit
- name: Functional Tests
run: |
export "FUNCTIONAL_XML"=Tests/FunctionalTests.xml
.Build/bin/phpunit --coverage-filter Classes --coverage-clover=functional-coverage.clover --colors -c $FUNCTIONAL_XML Tests/Functional --process-isolation
if: matrix.typo3 != '^13.4'
env:
typo3DatabaseHost: 127.0.0.1
typo3DatabaseName: typo3
typo3DatabasePassword: root
typo3DatabaseUsername: root
- name: Tests for ^13.4
run: |
export "FUNCTIONAL_XML"=Tests/FunctionalTests.xml
export "UNIT_XML"=Tests/UnitTests.xml
composer remove --dev ssch/typo3-rector infection/infection
rm -rf composer.lock .Build
composer require typo3/cms-backend:^13.4 typo3/cms-core:^13.4 typo3/cms-frontend:^13.4 typo3/cms-info:^13.4 typo3/cms-seo:^13.4
ln -nfs .Build/vendor/typo3/cms/typo3 typo3
.Build/bin/phpunit --colors -c $UNIT_XML Tests/Unit
.Build/bin/phpunit --colors -c $FUNCTIONAL_XML Tests/Functional --process-isolation
if: matrix.typo3 == '^13.4' && matrix.php == '8.3'
env:
typo3DatabaseHost: 127.0.0.1
typo3DatabaseName: typo3
typo3DatabasePassword: root
typo3DatabaseUsername: root
- name: Set up PHP Version 7.4 for Scrutinizer Upload
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
tools: composer:v2
- name: Upload coverage results to Scrutinizer
if: matrix.typo3 == '^12.4' && matrix.php == '8.1'
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