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'
|
2019-12-07 16:00:06 +01:00
|
|
|
jobs:
|
|
|
|
php-lint:
|
2020-07-07 16:33:34 +02:00
|
|
|
name: "PHP linter"
|
2020-11-24 20:36:29 +01:00
|
|
|
runs-on: ubuntu-20.04
|
2020-07-07 16:33:34 +02:00
|
|
|
steps:
|
2020-11-24 02:08:42 +01:00
|
|
|
- name: "Checkout"
|
2020-07-22 12:38:58 +02:00
|
|
|
uses: actions/checkout@v2
|
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-01-02 02:23:40 +01:00
|
|
|
tools: composer:v2.2
|
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:
|
|
|
|
- 7.2
|
|
|
|
- 7.3
|
|
|
|
- 7.4
|
2021-09-22 17:14:29 +02:00
|
|
|
- 8.0
|
2022-02-23 14:38:20 +01:00
|
|
|
- 8.1
|
2020-06-24 15:31:29 +02:00
|
|
|
code-quality:
|
2020-07-07 16:33:34 +02:00
|
|
|
name: "Code quality checks"
|
2020-11-24 20:36:29 +01:00
|
|
|
runs-on: ubuntu-20.04
|
2020-07-07 16:33:34 +02:00
|
|
|
steps:
|
2020-12-01 23:12:34 +01:00
|
|
|
- name: "Checkout"
|
2020-07-22 12:38:58 +02:00
|
|
|
uses: actions/checkout@v2
|
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-01-02 02:23:40 +01:00
|
|
|
tools: composer:v2.2
|
2020-10-31 19:18:59 +01:00
|
|
|
- name: "Show Composer version"
|
|
|
|
run: composer --version
|
2020-12-01 23:12:34 +01:00
|
|
|
- name: "Cache dependencies installed with composer"
|
2020-07-07 16:33:34 +02:00
|
|
|
uses: actions/cache@v1
|
|
|
|
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"
|
|
|
|
- "json:lint"
|
2022-02-24 13:13:30 +01:00
|
|
|
- "php:copypaste"
|
2021-08-24 02:34:05 +02:00
|
|
|
- "php:cs-fixer"
|
2022-02-24 13:13:30 +01:00
|
|
|
- "php:sniff"
|
|
|
|
- "ts:lint"
|
|
|
|
- "php:stan"
|
|
|
|
- "yaml:lint"
|
2020-05-22 11:38:45 +02:00
|
|
|
php-version:
|
2020-07-23 12:39:02 +02:00
|
|
|
- 7.4
|
2020-10-31 15:04:44 +01:00
|
|
|
code-quality-frontend:
|
|
|
|
name: "Code quality frontend checks"
|
2020-11-24 20:36:29 +01:00
|
|
|
runs-on: ubuntu-20.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"
|
2020-10-31 15:04:44 +01:00
|
|
|
uses: actions/checkout@v2
|
2020-12-01 23:12:34 +01:00
|
|
|
- name: "Install modules"
|
2020-10-31 15:04:44 +01:00
|
|
|
working-directory: ./Resources/Private
|
|
|
|
run: yarn
|
2020-12-01 23:12:34 +01:00
|
|
|
- name: "Run command"
|
2020-10-31 15:04:44 +01:00
|
|
|
working-directory: ./Resources/Private
|
|
|
|
run: "yarn lint:${{ matrix.command }}"
|
2020-07-08 16:53:12 +02:00
|
|
|
xliff-lint:
|
|
|
|
name: "Xliff linter"
|
2020-11-24 20:36:29 +01:00
|
|
|
runs-on: ubuntu-20.04
|
2020-07-08 16:53:12 +02:00
|
|
|
steps:
|
2020-12-01 23:12:34 +01:00
|
|
|
- name: "Checkout"
|
2020-07-08 16:53:12 +02:00
|
|
|
uses: actions/checkout@v2
|
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"
|
2020-11-24 20:36:29 +01:00
|
|
|
runs-on: ubuntu-20.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"
|
2020-07-22 12:38:58 +02:00
|
|
|
uses: actions/checkout@v2
|
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-01-02 02:23:40 +01:00
|
|
|
tools: composer:v2.2
|
2020-10-31 19:18:59 +01:00
|
|
|
- name: "Show Composer version"
|
|
|
|
run: composer --version
|
2020-12-01 23:12:34 +01:00
|
|
|
- name: "Cache dependencies installed with composer"
|
2020-07-07 16:33:34 +02:00
|
|
|
uses: actions/cache@v1
|
|
|
|
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: |
|
2021-11-03 01:05:16 +01:00
|
|
|
composer require --no-ansi --no-interaction --no-progress --no-install typo3/minimal:"$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:
|
|
|
|
- typo3-version: ^10.4
|
|
|
|
php-version: 7.2
|
|
|
|
composer-dependencies: highest
|
|
|
|
- typo3-version: ^10.4
|
|
|
|
php-version: 7.2
|
|
|
|
composer-dependencies: lowest
|
|
|
|
- typo3-version: ^10.4
|
|
|
|
php-version: 7.3
|
|
|
|
composer-dependencies: highest
|
|
|
|
- typo3-version: ^10.4
|
|
|
|
php-version: 7.3
|
|
|
|
composer-dependencies: lowest
|
|
|
|
- typo3-version: ^10.4
|
|
|
|
php-version: 7.4
|
|
|
|
composer-dependencies: highest
|
|
|
|
- typo3-version: ^10.4
|
|
|
|
php-version: 7.4
|
|
|
|
composer-dependencies: lowest
|
|
|
|
- typo3-version: ^11.5
|
|
|
|
php-version: 7.4
|
|
|
|
composer-dependencies: highest
|
|
|
|
- typo3-version: ^11.5
|
|
|
|
php-version: 7.4
|
|
|
|
composer-dependencies: lowest
|
|
|
|
- typo3-version: ^11.5
|
|
|
|
php-version: 8.0
|
|
|
|
composer-dependencies: highest
|
|
|
|
- typo3-version: ^11.5
|
|
|
|
php-version: 8.0
|
|
|
|
composer-dependencies: lowest
|
2022-02-23 14:38:20 +01:00
|
|
|
- typo3-version: ^11.5
|
|
|
|
php-version: 8.1
|
|
|
|
composer-dependencies: highest
|
|
|
|
- typo3-version: ^11.5
|
|
|
|
php-version: 8.1
|
|
|
|
composer-dependencies: lowest
|
2020-06-06 23:09:20 +02:00
|
|
|
functional-tests:
|
2020-07-07 16:33:34 +02:00
|
|
|
name: "Functional tests"
|
2020-11-27 01:41:24 +01:00
|
|
|
runs-on: ubuntu-18.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"
|
2020-07-22 12:38:58 +02:00
|
|
|
uses: actions/checkout@v2
|
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-01-02 02:23:40 +01:00
|
|
|
tools: composer:v2.2
|
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"
|
|
|
|
run: composer --version
|
2020-12-01 23:12:34 +01:00
|
|
|
- name: "Cache dependencies installed with composer"
|
2020-07-07 16:33:34 +02:00
|
|
|
uses: actions/cache@v1
|
|
|
|
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: |
|
2021-11-03 01:05:16 +01:00
|
|
|
composer require --no-ansi --no-interaction --no-progress --no-install typo3/minimal:"$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: |
|
2020-07-07 16:33:34 +02:00
|
|
|
export typo3DatabaseName="typo3";
|
|
|
|
export typo3DatabaseHost="127.0.0.1";
|
|
|
|
export typo3DatabaseUsername="root";
|
|
|
|
export typo3DatabasePassword="root";
|
|
|
|
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:
|
|
|
|
- typo3-version: ^10.4
|
|
|
|
php-version: 7.2
|
|
|
|
composer-dependencies: highest
|
|
|
|
- typo3-version: ^10.4
|
|
|
|
php-version: 7.2
|
|
|
|
composer-dependencies: lowest
|
|
|
|
- typo3-version: ^10.4
|
|
|
|
php-version: 7.3
|
|
|
|
composer-dependencies: highest
|
|
|
|
- typo3-version: ^10.4
|
|
|
|
php-version: 7.3
|
|
|
|
composer-dependencies: lowest
|
|
|
|
- typo3-version: ^10.4
|
|
|
|
php-version: 7.4
|
|
|
|
composer-dependencies: highest
|
|
|
|
- typo3-version: ^10.4
|
|
|
|
php-version: 7.4
|
|
|
|
composer-dependencies: lowest
|