2020-07-07 16:33:34 +02:00
|
|
|
---
|
2021-08-24 02:34:05 +02:00
|
|
|
# This GitHub Actions workflow uses the same development tools that are also installed locally
|
|
|
|
# via Composer or PHIVE and calls them using the Composer scripts.
|
|
|
|
name: CI with Composer scripts
|
2019-12-07 16:00:06 +01:00
|
|
|
on:
|
2020-08-25 17:06:41 +02:00
|
|
|
push:
|
2022-01-03 01:54:00 +01:00
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
2020-11-21 17:58:35 +01:00
|
|
|
schedule:
|
|
|
|
- cron: '15 3 * * 1'
|
2022-10-19 15:14:17 +02:00
|
|
|
permissions:
|
|
|
|
contents: read
|
2019-12-07 16:00:06 +01:00
|
|
|
jobs:
|
|
|
|
php-lint:
|
2020-07-07 16:33:34 +02:00
|
|
|
name: "PHP linter"
|
2022-06-15 16:26:43 +02:00
|
|
|
runs-on: ubuntu-22.04
|
2020-07-07 16:33:34 +02:00
|
|
|
steps:
|
2020-11-24 02:08:42 +01:00
|
|
|
- name: "Checkout"
|
2023-09-04 16:05:19 +02:00
|
|
|
uses: actions/checkout@v4
|
2020-07-07 16:33:34 +02:00
|
|
|
- name: "Install PHP"
|
|
|
|
uses: shivammathur/setup-php@v2
|
|
|
|
with:
|
|
|
|
php-version: "${{ matrix.php-version }}"
|
2021-01-06 13:06:39 +01:00
|
|
|
coverage: none
|
2022-08-27 18:53:54 +02:00
|
|
|
tools: composer:v2.4
|
2022-09-21 09:48:16 +02:00
|
|
|
- name: "Show the Composer configuration"
|
|
|
|
run: "composer config --global --list"
|
2020-07-07 16:33:34 +02:00
|
|
|
- name: "Run PHP lint"
|
|
|
|
run: "composer ci:php:lint"
|
2019-12-07 16:00:06 +01:00
|
|
|
strategy:
|
2021-02-24 12:24:52 +01:00
|
|
|
fail-fast: false
|
2019-12-07 16:00:06 +01:00
|
|
|
matrix:
|
|
|
|
php-version:
|
2022-06-15 18:22:18 +02:00
|
|
|
- "7.4"
|
|
|
|
- "8.0"
|
|
|
|
- "8.1"
|
2023-04-02 12:53:33 +02:00
|
|
|
- "8.2"
|
2023-11-01 21:20:27 +01:00
|
|
|
- "8.3"
|
2020-06-24 15:31:29 +02:00
|
|
|
code-quality:
|
2020-07-07 16:33:34 +02:00
|
|
|
name: "Code quality checks"
|
2022-06-15 16:26:43 +02:00
|
|
|
runs-on: ubuntu-22.04
|
2020-07-07 16:33:34 +02:00
|
|
|
steps:
|
2020-12-01 23:12:34 +01:00
|
|
|
- name: "Checkout"
|
2023-09-04 16:05:19 +02:00
|
|
|
uses: actions/checkout@v4
|
2020-12-01 23:12:34 +01:00
|
|
|
- name: "Install PHP"
|
2020-07-07 16:33:34 +02:00
|
|
|
uses: shivammathur/setup-php@v2
|
|
|
|
with:
|
|
|
|
php-version: "${{ matrix.php-version }}"
|
2021-01-06 13:06:39 +01:00
|
|
|
coverage: none
|
2022-08-27 18:53:54 +02:00
|
|
|
tools: composer:v2.4
|
2020-10-31 19:18:59 +01:00
|
|
|
- name: "Show Composer version"
|
2022-09-21 09:48:16 +02:00
|
|
|
run: "composer --version"
|
|
|
|
- name: "Show the Composer configuration"
|
|
|
|
run: "composer config --global --list"
|
2020-12-01 23:12:34 +01:00
|
|
|
- name: "Cache dependencies installed with composer"
|
2022-04-03 02:26:04 +02:00
|
|
|
uses: actions/cache@v3
|
2020-07-07 16:33:34 +02:00
|
|
|
with:
|
2020-11-29 15:04:50 +01:00
|
|
|
key: "php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}"
|
2021-01-09 23:46:04 +01:00
|
|
|
path: ~/.cache/composer
|
2020-07-07 16:33:34 +02:00
|
|
|
restore-keys: "php${{ matrix.php-version }}-composer-\n"
|
2020-12-01 23:12:34 +01:00
|
|
|
- name: "Install Composer dependencies"
|
2020-07-07 16:33:34 +02:00
|
|
|
run: "composer install --no-progress"
|
2020-12-01 23:12:34 +01:00
|
|
|
- name: "Run command"
|
2020-07-07 16:33:34 +02:00
|
|
|
run: "composer ci:${{ matrix.command }}"
|
2020-05-22 11:38:45 +02:00
|
|
|
strategy:
|
2021-02-24 12:24:52 +01:00
|
|
|
fail-fast: false
|
2020-05-22 11:38:45 +02:00
|
|
|
matrix:
|
2020-06-24 15:31:29 +02:00
|
|
|
command:
|
2021-08-24 02:34:05 +02:00
|
|
|
- "composer:normalize"
|
2023-02-22 18:46:08 +01:00
|
|
|
- "composer:psr-verify"
|
2021-08-24 02:34:05 +02:00
|
|
|
- "json:lint"
|
|
|
|
- "php:cs-fixer"
|
2022-02-24 13:13:30 +01:00
|
|
|
- "php:sniff"
|
|
|
|
- "php:stan"
|
2022-03-24 18:00:39 +01:00
|
|
|
- "ts:lint"
|
2022-02-24 13:13:30 +01:00
|
|
|
- "yaml:lint"
|
2020-05-22 11:38:45 +02:00
|
|
|
php-version:
|
2022-10-15 21:40:46 +02:00
|
|
|
- "8.1"
|
2020-10-31 15:04:44 +01:00
|
|
|
code-quality-frontend:
|
|
|
|
name: "Code quality frontend checks"
|
2022-06-15 16:26:43 +02:00
|
|
|
runs-on: ubuntu-22.04
|
2020-10-31 15:04:44 +01:00
|
|
|
strategy:
|
2021-02-24 12:24:52 +01:00
|
|
|
fail-fast: false
|
2020-10-31 15:04:44 +01:00
|
|
|
matrix:
|
|
|
|
command:
|
|
|
|
- "style"
|
|
|
|
- "js"
|
|
|
|
steps:
|
2020-12-01 23:12:34 +01:00
|
|
|
- name: "Checkout"
|
2023-09-04 16:05:19 +02:00
|
|
|
uses: actions/checkout@v4
|
2020-12-01 23:12:34 +01:00
|
|
|
- name: "Install modules"
|
2020-10-31 15:04:44 +01:00
|
|
|
run: yarn
|
2020-12-01 23:12:34 +01:00
|
|
|
- name: "Run command"
|
2020-10-31 15:04:44 +01:00
|
|
|
run: "yarn lint:${{ matrix.command }}"
|
2020-07-08 16:53:12 +02:00
|
|
|
xliff-lint:
|
|
|
|
name: "Xliff linter"
|
2022-06-15 16:26:43 +02:00
|
|
|
runs-on: ubuntu-22.04
|
2020-07-08 16:53:12 +02:00
|
|
|
steps:
|
2020-12-01 23:12:34 +01:00
|
|
|
- name: "Checkout"
|
2023-09-04 16:05:19 +02:00
|
|
|
uses: actions/checkout@v4
|
2021-04-07 14:27:28 +02:00
|
|
|
- name: "Run the xliff lint"
|
|
|
|
uses: TYPO3-Continuous-Integration/TYPO3-CI-Xliff-Lint@v1
|
2019-12-07 19:00:51 +01:00
|
|
|
unit-tests:
|
2020-07-07 16:33:34 +02:00
|
|
|
name: "Unit tests"
|
2022-06-15 16:26:43 +02:00
|
|
|
runs-on: ubuntu-22.04
|
2020-08-05 11:40:46 +02:00
|
|
|
needs: php-lint
|
2020-07-07 16:33:34 +02:00
|
|
|
steps:
|
2020-12-01 23:12:34 +01:00
|
|
|
- name: "Checkout"
|
2023-09-04 16:05:19 +02:00
|
|
|
uses: actions/checkout@v4
|
2020-12-01 23:12:34 +01:00
|
|
|
- name: "Install PHP"
|
2020-07-07 16:33:34 +02:00
|
|
|
uses: shivammathur/setup-php@v2
|
|
|
|
with:
|
|
|
|
php-version: "${{ matrix.php-version }}"
|
2021-01-06 13:06:39 +01:00
|
|
|
coverage: none
|
2022-08-27 18:53:54 +02:00
|
|
|
tools: composer:v2.4
|
2020-10-31 19:18:59 +01:00
|
|
|
- name: "Show Composer version"
|
2022-09-21 09:48:16 +02:00
|
|
|
run: "composer --version"
|
|
|
|
- name: "Show the Composer configuration"
|
|
|
|
run: "composer config --global --list"
|
2020-12-01 23:12:34 +01:00
|
|
|
- name: "Cache dependencies installed with composer"
|
2022-04-03 02:26:04 +02:00
|
|
|
uses: actions/cache@v3
|
2020-07-07 16:33:34 +02:00
|
|
|
with:
|
2022-02-24 16:41:34 +01:00
|
|
|
key: "php${{ matrix.php-version }}-typo3${{ matrix.typo3-version }}-${{ matrix.composer-dependencies }}-composer-${{ hashFiles('**/composer.json') }}"
|
2021-01-09 23:46:04 +01:00
|
|
|
path: ~/.cache/composer
|
2022-02-24 16:41:34 +01:00
|
|
|
restore-keys: "php${{ matrix.php-version }}-typo3${{ matrix.typo3-version }}-${{ matrix.composer-dependencies }}-composer-\n"
|
2022-02-24 09:11:49 +01:00
|
|
|
- name: "Install TYPO3 Core"
|
|
|
|
env:
|
2020-07-07 16:33:34 +02:00
|
|
|
TYPO3: "${{ matrix.typo3-version }}"
|
|
|
|
run: |
|
2022-08-28 11:08:47 +02:00
|
|
|
composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"$TYPO3"
|
2020-07-07 16:33:34 +02:00
|
|
|
composer show
|
2022-02-24 09:11:49 +01:00
|
|
|
- name: "Install lowest dependencies with composer"
|
|
|
|
if: "matrix.composer-dependencies == 'lowest'"
|
2020-07-07 16:33:34 +02:00
|
|
|
run: |
|
2020-11-24 02:14:15 +01:00
|
|
|
composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest
|
2020-07-07 16:33:34 +02:00
|
|
|
composer show
|
2022-02-24 09:11:49 +01:00
|
|
|
- name: "Install highest dependencies with composer"
|
|
|
|
if: "matrix.composer-dependencies == 'highest'"
|
2020-07-07 16:33:34 +02:00
|
|
|
run: |
|
2020-11-24 02:14:15 +01:00
|
|
|
composer update --no-ansi --no-interaction --no-progress --with-dependencies
|
2020-07-07 16:33:34 +02:00
|
|
|
composer show
|
2020-12-01 23:12:34 +01:00
|
|
|
- name: "Run unit tests"
|
2020-07-07 16:33:34 +02:00
|
|
|
run: "composer ci:tests:unit"
|
2019-12-07 19:00:51 +01:00
|
|
|
strategy:
|
2021-02-24 12:24:52 +01:00
|
|
|
fail-fast: false
|
2019-12-07 19:00:51 +01:00
|
|
|
matrix:
|
2021-11-06 15:57:36 +01:00
|
|
|
include:
|
2022-06-15 18:22:18 +02:00
|
|
|
- typo3-version: "^11.5"
|
|
|
|
php-version: "7.4"
|
2021-11-06 15:57:36 +01:00
|
|
|
composer-dependencies: lowest
|
2022-06-15 18:22:18 +02:00
|
|
|
- typo3-version: "^11.5"
|
2022-10-09 06:15:42 +02:00
|
|
|
php-version: "7.4"
|
2021-11-06 15:57:36 +01:00
|
|
|
composer-dependencies: highest
|
2022-06-15 18:22:18 +02:00
|
|
|
- typo3-version: "^11.5"
|
|
|
|
php-version: "8.0"
|
2021-11-06 15:57:36 +01:00
|
|
|
composer-dependencies: lowest
|
2022-06-15 18:22:18 +02:00
|
|
|
- typo3-version: "^11.5"
|
2022-10-09 06:15:42 +02:00
|
|
|
php-version: "8.0"
|
2022-02-23 14:38:20 +01:00
|
|
|
composer-dependencies: highest
|
2022-06-15 18:22:18 +02:00
|
|
|
- typo3-version: "^11.5"
|
|
|
|
php-version: "8.1"
|
2022-02-23 14:38:20 +01:00
|
|
|
composer-dependencies: lowest
|
2022-10-09 06:15:42 +02:00
|
|
|
- typo3-version: "^11.5"
|
|
|
|
php-version: "8.1"
|
|
|
|
composer-dependencies: highest
|
2023-04-02 12:53:33 +02:00
|
|
|
- typo3-version: "^11.5"
|
|
|
|
php-version: "8.2"
|
|
|
|
composer-dependencies: lowest
|
|
|
|
- typo3-version: "^11.5"
|
|
|
|
php-version: "8.2"
|
|
|
|
composer-dependencies: highest
|
2023-11-01 21:20:27 +01:00
|
|
|
- typo3-version: "^11.5"
|
|
|
|
php-version: "8.3"
|
|
|
|
composer-dependencies: lowest
|
|
|
|
- typo3-version: "^11.5"
|
|
|
|
php-version: "8.3"
|
|
|
|
composer-dependencies: highest
|
2023-04-25 10:01:54 +02:00
|
|
|
- typo3-version: "^12.4"
|
2022-10-19 16:04:38 +02:00
|
|
|
php-version: "8.1"
|
|
|
|
composer-dependencies: lowest
|
2023-04-25 10:01:54 +02:00
|
|
|
- typo3-version: "^12.4"
|
2022-10-19 16:04:38 +02:00
|
|
|
php-version: "8.1"
|
|
|
|
composer-dependencies: highest
|
2023-04-25 10:01:54 +02:00
|
|
|
- typo3-version: "^12.4"
|
2023-04-02 12:53:33 +02:00
|
|
|
php-version: "8.2"
|
|
|
|
composer-dependencies: lowest
|
2023-04-25 10:01:54 +02:00
|
|
|
- typo3-version: "^12.4"
|
2023-04-02 12:53:33 +02:00
|
|
|
php-version: "8.2"
|
|
|
|
composer-dependencies: highest
|
2023-11-01 21:20:27 +01:00
|
|
|
- typo3-version: "^12.4"
|
|
|
|
php-version: "8.3"
|
|
|
|
composer-dependencies: lowest
|
|
|
|
- typo3-version: "^12.4"
|
|
|
|
php-version: "8.3"
|
|
|
|
composer-dependencies: highest
|
2020-06-06 23:09:20 +02:00
|
|
|
functional-tests:
|
2020-07-07 16:33:34 +02:00
|
|
|
name: "Functional tests"
|
2022-09-21 16:54:21 +02:00
|
|
|
runs-on: ubuntu-22.04
|
2020-08-05 11:40:46 +02:00
|
|
|
needs: php-lint
|
2022-09-21 16:54:21 +02:00
|
|
|
env:
|
|
|
|
DB_DATABASE: typo3
|
|
|
|
DB_USER: root
|
|
|
|
DB_PASSWORD: root
|
|
|
|
DB_HOST: localhost
|
2020-07-07 16:33:34 +02:00
|
|
|
steps:
|
2020-12-01 23:12:34 +01:00
|
|
|
- name: "Checkout"
|
2023-09-04 16:05:19 +02:00
|
|
|
uses: actions/checkout@v4
|
2020-12-01 23:12:34 +01:00
|
|
|
- name: "Install PHP"
|
2020-07-07 16:33:34 +02:00
|
|
|
uses: shivammathur/setup-php@v2
|
|
|
|
with:
|
|
|
|
php-version: "${{ matrix.php-version }}"
|
2022-08-27 18:53:54 +02:00
|
|
|
tools: composer:v2.4
|
2020-11-27 01:41:24 +01:00
|
|
|
extensions: mysqli
|
2021-01-06 13:06:39 +01:00
|
|
|
coverage: none
|
2020-10-31 19:18:59 +01:00
|
|
|
- name: "Show Composer version"
|
2022-09-21 09:48:16 +02:00
|
|
|
run: "composer --version"
|
|
|
|
- name: "Show the Composer configuration"
|
|
|
|
run: "composer config --global --list"
|
2020-12-01 23:12:34 +01:00
|
|
|
- name: "Cache dependencies installed with composer"
|
2022-04-03 02:26:04 +02:00
|
|
|
uses: actions/cache@v3
|
2020-07-07 16:33:34 +02:00
|
|
|
with:
|
2022-02-24 16:41:34 +01:00
|
|
|
key: "php${{ matrix.php-version }}-typo3${{ matrix.typo3-version }}-${{ matrix.composer-dependencies }}-composer-${{ hashFiles('**/composer.json') }}"
|
2021-01-09 23:46:04 +01:00
|
|
|
path: ~/.cache/composer
|
2022-02-24 16:41:34 +01:00
|
|
|
restore-keys: "php${{ matrix.php-version }}-typo3${{ matrix.typo3-version }}-${{ matrix.composer-dependencies }}-composer-\n"
|
2022-02-24 09:11:49 +01:00
|
|
|
- name: "Install TYPO3 Core"
|
|
|
|
env:
|
2020-07-07 16:33:34 +02:00
|
|
|
TYPO3: "${{ matrix.typo3-version }}"
|
|
|
|
run: |
|
2022-08-28 11:08:47 +02:00
|
|
|
composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"$TYPO3"
|
2020-07-07 16:33:34 +02:00
|
|
|
composer show
|
2022-02-24 09:11:49 +01:00
|
|
|
- name: "Install lowest dependencies with composer"
|
|
|
|
if: "matrix.composer-dependencies == 'lowest'"
|
2020-07-07 16:33:34 +02:00
|
|
|
run: |
|
2020-11-24 02:14:15 +01:00
|
|
|
composer update --no-ansi --no-interaction --no-progress --with-dependencies --prefer-lowest
|
2020-07-07 16:33:34 +02:00
|
|
|
composer show
|
2022-02-24 09:11:49 +01:00
|
|
|
- name: "Install highest dependencies with composer"
|
|
|
|
if: "matrix.composer-dependencies == 'highest'"
|
2020-07-07 16:33:34 +02:00
|
|
|
run: |
|
2020-11-24 02:14:15 +01:00
|
|
|
composer update --no-ansi --no-interaction --no-progress --with-dependencies
|
2020-07-07 16:33:34 +02:00
|
|
|
composer show
|
2020-12-01 23:12:34 +01:00
|
|
|
- name: "Start MySQL"
|
2020-07-07 16:33:34 +02:00
|
|
|
run: "sudo /etc/init.d/mysql start"
|
2020-12-01 23:12:34 +01:00
|
|
|
- name: "Run functional tests"
|
2020-10-31 12:38:41 +01:00
|
|
|
run: |
|
2022-09-21 16:54:21 +02:00
|
|
|
export typo3DatabaseName="$DB_DATABASE";
|
|
|
|
export typo3DatabaseHost="$DB_HOST";
|
|
|
|
export typo3DatabaseUsername="$DB_USER";
|
|
|
|
export typo3DatabasePassword="$DB_PASSWORD";
|
2020-07-07 16:33:34 +02:00
|
|
|
composer ci:tests:functional
|
2020-06-06 23:09:20 +02:00
|
|
|
strategy:
|
2021-02-24 12:24:52 +01:00
|
|
|
fail-fast: false
|
2020-06-06 23:09:20 +02:00
|
|
|
matrix:
|
2022-02-24 09:11:14 +01:00
|
|
|
include:
|
2022-06-15 18:22:18 +02:00
|
|
|
- typo3-version: "^11.5"
|
|
|
|
php-version: "7.4"
|
2022-03-02 11:45:29 +01:00
|
|
|
composer-dependencies: lowest
|
2022-06-15 18:22:18 +02:00
|
|
|
- typo3-version: "^11.5"
|
2022-10-09 06:15:42 +02:00
|
|
|
php-version: "7.4"
|
2022-03-02 11:45:29 +01:00
|
|
|
composer-dependencies: highest
|
2022-06-15 18:22:18 +02:00
|
|
|
- typo3-version: "^11.5"
|
|
|
|
php-version: "8.0"
|
2022-03-02 11:45:29 +01:00
|
|
|
composer-dependencies: lowest
|
2022-06-15 18:22:18 +02:00
|
|
|
- typo3-version: "^11.5"
|
2022-10-09 06:15:42 +02:00
|
|
|
php-version: "8.0"
|
2022-03-02 11:45:29 +01:00
|
|
|
composer-dependencies: highest
|
2022-06-15 18:22:18 +02:00
|
|
|
- typo3-version: "^11.5"
|
|
|
|
php-version: "8.1"
|
2022-03-02 11:45:29 +01:00
|
|
|
composer-dependencies: lowest
|
2022-10-09 06:15:42 +02:00
|
|
|
- typo3-version: "^11.5"
|
|
|
|
php-version: "8.1"
|
|
|
|
composer-dependencies: highest
|
2023-04-02 12:53:33 +02:00
|
|
|
- typo3-version: "^11.5"
|
|
|
|
php-version: "8.2"
|
|
|
|
composer-dependencies: lowest
|
|
|
|
- typo3-version: "^11.5"
|
|
|
|
php-version: "8.2"
|
|
|
|
composer-dependencies: highest
|
2023-11-01 21:20:27 +01:00
|
|
|
- typo3-version: "^11.5"
|
|
|
|
php-version: "8.3"
|
|
|
|
composer-dependencies: lowest
|
|
|
|
- typo3-version: "^11.5"
|
|
|
|
php-version: "8.3"
|
|
|
|
composer-dependencies: highest
|
2023-04-25 10:01:54 +02:00
|
|
|
- typo3-version: "^12.4"
|
2022-10-19 19:12:47 +02:00
|
|
|
php-version: "8.1"
|
|
|
|
composer-dependencies: lowest
|
2023-04-25 10:01:54 +02:00
|
|
|
- typo3-version: "^12.4"
|
2022-10-19 19:12:47 +02:00
|
|
|
php-version: "8.1"
|
|
|
|
composer-dependencies: highest
|
2023-04-25 10:01:54 +02:00
|
|
|
- typo3-version: "^12.4"
|
2023-04-02 12:53:33 +02:00
|
|
|
php-version: "8.2"
|
|
|
|
composer-dependencies: lowest
|
2023-04-25 10:01:54 +02:00
|
|
|
- typo3-version: "^12.4"
|
2023-04-02 12:53:33 +02:00
|
|
|
php-version: "8.2"
|
|
|
|
composer-dependencies: highest
|
2023-11-01 21:20:27 +01:00
|
|
|
- typo3-version: "^12.4"
|
|
|
|
php-version: "8.3"
|
|
|
|
composer-dependencies: lowest
|
|
|
|
- typo3-version: "^12.4"
|
|
|
|
php-version: "8.3"
|
|
|
|
composer-dependencies: highest
|