Skip to content

Version 13.0.0

Version 13.0.0 #370

Workflow file for this run

name: "PHP Checks"
on:
push:
pull_request:
schedule:
- cron: "30 6 * * 1"
env:
PHP_EXTENSIONS: "intl, mbstring, json, zip, curl"
jobs:
php-lint:
name: "PHP Lint"
runs-on: "ubuntu-latest"
strategy:
matrix:
php-version:
- "8.1"
- "8.2"
- "8.3"
- "8.4"
steps:
-
name: "Checkout"
uses: "actions/checkout@v4"
-
name: "Setup PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
extensions: "${{ env.PHP_EXTENSIONS }}"
-
name: "Validate composer.json and composer.lock"
run: "composer validate --strict"
-
name: "Determine composer cache directory"
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
-
name: "Cache dependencies installed with composer"
uses: "actions/cache@v4"
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: "php-${{ matrix.php-version }}-composer-${{ hashFiles('composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-"
-
name: "Install composer dependencies"
run: "composer install --no-interaction --no-progress --no-suggest"
-
name: "Run Linter"
run: "composer lint:php"
php-qs:
name: "PHP QS"
runs-on: "ubuntu-latest"
needs: "php-lint"
strategy:
matrix:
command:
- "test:phpcs"
- "test:rector"
- "test:phpcompatibility"
- "test:phpmd"
- "test:phpstan"
php-version:
- "8.1"
- "8.2"
- "8.3"
- "8.4"
### Exclude PHP 8.4 for php-c-fixers as there is currently no support
exclude:
- command: "test:phpcs"
php-version: "8.4"
steps:
-
name: "Checkout"
uses: "actions/checkout@v4"
-
name: "Setup PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
extensions: "${{ env.PHP_EXTENSIONS }}"
-
name: "Validate composer.json and composer.lock"
run: "composer validate --strict"
-
name: "Determine composer cache directory"
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
-
name: "Cache dependencies installed with composer"
uses: "actions/cache@v4"
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: "php-${{ matrix.php-version }}-composer-${{ hashFiles('composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-"
-
name: "Install composer dependencies"
run: "composer install --no-interaction --no-progress --no-suggest"
-
name: "Run command"
run: "composer ${{ matrix.command }}"
php-unit:
name: "PHP Unit"
runs-on: "ubuntu-latest"
needs: ["php-lint", "php-qs"]
strategy:
fail-fast: false
matrix:
include:
-
typo3-version: "^12.4"
php-version: "8.1"
-
typo3-version: "^12.4"
php-version: "8.2"
-
typo3-version: "^12.4"
php-version: "8.3"
-
typo3-version: "^12.4"
php-version: "8.4"
-
typo3-version: "^13.4"
php-version: "8.2"
-
typo3-version: "^13.4"
php-version: "8.3"
-
typo3-version: "^13.4"
php-version: "8.4"
steps:
-
name: "Checkout"
uses: "actions/checkout@v4"
-
name: "Setup PHP"
uses: "shivammathur/setup-php@v2"
with:
php-version: "${{ matrix.php-version }}"
extensions: "${{ env.PHP_EXTENSIONS }}"
-
name: "Validate composer.json and composer.lock"
run: "composer validate --strict"
-
name: "Determine composer cache directory"
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
-
name: "Cache dependencies installed with composer"
uses: "actions/cache@v4"
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: "php-${{ matrix.php-version }}-composer-${{ hashFiles('composer.lock') }}"
restore-keys: "php-${{ matrix.php-version }}-composer-"
-
name: "Install composer dependencies"
run: |
composer remove --no-update typo3/cms typo3/cms-core
composer require typo3/minimal:"${{ matrix.typo3-version }}"
-
name: "Run PHP unit tests"
run: "composer test:phpunit"