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"
|
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"
|
2022-03-22 17:57:39 +01:00
|
|
|
uses: actions/checkout@v3
|
2022-10-16 02:10:20 +02:00
|
|
|
- name: "Set composer token"
|
|
|
|
run: "Build/Scripts/runTests.sh -p ${{ matrix.php-version }} -s composer -e 'config github-oauth.github.com ${{ github.token }}'"
|
2022-09-21 09:48:16 +02:00
|
|
|
- name: "Show the Composer configuration"
|
2022-10-16 02:10:20 +02:00
|
|
|
run: "Build/Scripts/runTests.sh -t 11 -p ${{ matrix.php-version }} -s composer -e 'config --global --list'"
|
2020-07-07 16:33:34 +02:00
|
|
|
- name: "Run PHP lint"
|
2022-10-16 02:10:20 +02:00
|
|
|
run: "Build/Scripts/runTests.sh -t 11 -p ${{ matrix.php-version }} -s composer -e '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"
|
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"
|
2022-03-22 17:57:39 +01:00
|
|
|
uses: actions/checkout@v3
|
2022-10-16 02:10:20 +02:00
|
|
|
- name: "Set composer token"
|
|
|
|
run: "Build/Scripts/runTests.sh -p ${{ matrix.php-version }} -s composer -e 'config github-oauth.github.com ${{ github.token }}'"
|
2020-10-31 19:18:59 +01:00
|
|
|
- name: "Show Composer version"
|
2022-10-16 02:10:20 +02:00
|
|
|
run: "Build/Scripts/runTests.sh -t 11 -p ${{ matrix.php-version }} -s composer -e '--version'"
|
2022-09-21 09:48:16 +02:00
|
|
|
- name: "Show the Composer configuration"
|
2022-10-16 02:10:20 +02:00
|
|
|
run: "Build/Scripts/runTests.sh -t 11 -p ${{ matrix.php-version }} -s composer -e '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"
|
2022-10-16 02:10:20 +02:00
|
|
|
run: "Build/Scripts/runTests.sh -t 11 -p ${{ matrix.php-version }} -s composerInstall"
|
2020-12-01 23:12:34 +01:00
|
|
|
- name: "Run command"
|
2022-10-16 02:10:20 +02:00
|
|
|
run: "Build/Scripts/runTests.sh -t 11 -p ${{ matrix.php-version }} -s composer -e '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:
|
2022-10-16 02:10:20 +02:00
|
|
|
# @todo disabled composer:normalize temporarly, as this does not work out due composer.json <-> lock
|
|
|
|
# discrepancy with keep json file unchanged logic of runTests.sh. Does this tests make sense for
|
|
|
|
# extension/package development as this does not have fixed composer.lock files, thus always having
|
|
|
|
# valid composer.json <-> lock if not proceeded like runTests.sh ?
|
|
|
|
# - "composer:normalize"
|
2021-08-24 02:34:05 +02:00
|
|
|
- "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"
|
|
|
|
- "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
|
2022-10-16 02:10:20 +02:00
|
|
|
env:
|
|
|
|
GITHUB_COMPOSER_TOKEN: ${{ github.token }}
|
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"
|
2022-03-22 17:57:39 +01:00
|
|
|
uses: actions/checkout@v3
|
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"
|
2022-03-22 17:57:39 +01:00
|
|
|
uses: actions/checkout@v3
|
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"
|
2022-03-22 17:57:39 +01:00
|
|
|
uses: actions/checkout@v3
|
2022-10-16 02:10:20 +02:00
|
|
|
- name: "Set composer token"
|
|
|
|
run: "Build/Scripts/runTests.sh -p ${{ matrix.php-version }} -s composer -e 'config github-oauth.github.com ${{ github.token }}'"
|
2020-10-31 19:18:59 +01:00
|
|
|
- name: "Show Composer version"
|
2022-10-16 02:10:20 +02:00
|
|
|
run: "Build/Scripts/runTests.sh -t ${{ matrix.typo3-version }} -p ${{ matrix.php-version }} -s composer -e '--version'"
|
2022-09-21 09:48:16 +02:00
|
|
|
- name: "Show the Composer configuration"
|
2022-10-16 02:10:20 +02:00
|
|
|
run: "Build/Scripts/runTests.sh -t ${{ matrix.typo3-version }} -p ${{ matrix.php-version }} -s composer -e '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 lowest dependencies with composer"
|
|
|
|
if: "matrix.composer-dependencies == 'lowest'"
|
2022-10-16 02:10:20 +02:00
|
|
|
run: "Build/Scripts/runTests.sh -t ${{ matrix.typo3-version }} -p ${{ matrix.php-version }} -s composerInstallLowest"
|
2022-02-24 09:11:49 +01:00
|
|
|
- name: "Install highest dependencies with composer"
|
|
|
|
if: "matrix.composer-dependencies == 'highest'"
|
2022-10-16 02:10:20 +02:00
|
|
|
run: "Build/Scripts/runTests.sh -t ${{ matrix.typo3-version }} -p ${{ matrix.php-version }} -s composerInstallHighest"
|
2020-12-01 23:12:34 +01:00
|
|
|
- name: "Run unit tests"
|
2022-10-16 02:10:20 +02:00
|
|
|
run: "Build/Scripts/runTests.sh -t ${{ matrix.typo3-version }} -p ${{ matrix.php-version }} -s 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-10-16 02:10:20 +02:00
|
|
|
- typo3-version: "11"
|
2022-06-15 18:22:18 +02:00
|
|
|
php-version: "7.4"
|
2021-11-06 15:57:36 +01:00
|
|
|
composer-dependencies: lowest
|
2022-10-16 02:10:20 +02:00
|
|
|
- typo3-version: "11"
|
2022-10-09 06:15:42 +02:00
|
|
|
php-version: "7.4"
|
2021-11-06 15:57:36 +01:00
|
|
|
composer-dependencies: highest
|
2022-10-16 02:10:20 +02:00
|
|
|
- typo3-version: "11"
|
2022-06-15 18:22:18 +02:00
|
|
|
php-version: "8.0"
|
2021-11-06 15:57:36 +01:00
|
|
|
composer-dependencies: lowest
|
2022-10-16 02:10:20 +02:00
|
|
|
- typo3-version: "11"
|
2022-10-09 06:15:42 +02:00
|
|
|
php-version: "8.0"
|
2022-02-23 14:38:20 +01:00
|
|
|
composer-dependencies: highest
|
2022-10-16 02:10:20 +02:00
|
|
|
- typo3-version: "11"
|
|
|
|
php-version: "8.1"
|
|
|
|
composer-dependencies: lowest
|
|
|
|
- typo3-version: "11"
|
|
|
|
php-version: "8.1"
|
|
|
|
composer-dependencies: highest
|
|
|
|
- typo3-version: "12"
|
2022-06-15 18:22:18 +02:00
|
|
|
php-version: "8.1"
|
2022-02-23 14:38:20 +01:00
|
|
|
composer-dependencies: lowest
|
2022-10-16 02:10:20 +02:00
|
|
|
- typo3-version: "12"
|
2022-10-09 06:15:42 +02:00
|
|
|
php-version: "8.1"
|
|
|
|
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
|
2020-07-07 16:33:34 +02:00
|
|
|
steps:
|
2020-12-01 23:12:34 +01:00
|
|
|
- name: "Checkout"
|
2022-03-22 17:57:39 +01:00
|
|
|
uses: actions/checkout@v3
|
2022-10-16 02:10:20 +02:00
|
|
|
- name: "Set composer token"
|
|
|
|
run: "Build/Scripts/runTests.sh -p ${{ matrix.php-version }} -s composer -e 'config github-oauth.github.com ${{ github.token }}'"
|
2020-10-31 19:18:59 +01:00
|
|
|
- name: "Show Composer version"
|
2022-10-16 02:10:20 +02:00
|
|
|
run: "Build/Scripts/runTests.sh -t ${{ matrix.typo3-version }} -p ${{ matrix.php-version }} -s composer -e '--version'"
|
2022-09-21 09:48:16 +02:00
|
|
|
- name: "Show the Composer configuration"
|
2022-10-16 02:10:20 +02:00
|
|
|
run: "Build/Scripts/runTests.sh -t ${{ matrix.typo3-version }} -p ${{ matrix.php-version }} -s composer -e '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-10-16 02:10:20 +02:00
|
|
|
- name: "Set composer token"
|
|
|
|
run: "Build/Scripts/runTests.sh -t ${{ matrix.typo3-version }} -p ${{ matrix.php-version }} -s composer -e 'config github-oauth.github.com ${{ secrets.GITHUB_TOKEN }}'"
|
2022-02-24 09:11:49 +01:00
|
|
|
- name: "Install lowest dependencies with composer"
|
|
|
|
if: "matrix.composer-dependencies == 'lowest'"
|
2022-10-16 02:10:20 +02:00
|
|
|
run: "Build/Scripts/runTests.sh -t ${{ matrix.typo3-version }} -p ${{ matrix.php-version }} -s composerInstallLowest"
|
2022-02-24 09:11:49 +01:00
|
|
|
- name: "Install highest dependencies with composer"
|
|
|
|
if: "matrix.composer-dependencies == 'highest'"
|
2022-10-16 02:10:20 +02:00
|
|
|
run: "Build/Scripts/runTests.sh -t ${{ matrix.typo3-version }} -p ${{ matrix.php-version }} -s composerInstallHighest"
|
|
|
|
- name: "Run functional tests (sqlite)"
|
|
|
|
run: "Build/Scripts/runTests.sh -t ${{ matrix.typo3-version }} -p ${{ matrix.php-version }} -s functional -d sqlite"
|
|
|
|
- name: "Run functional tests (MySQL 5.5 mysqli)"
|
|
|
|
if: "matrix.typo3-version == '11'"
|
|
|
|
run: "Build/Scripts/runTests.sh -t ${{ matrix.typo3-version }} -p ${{ matrix.php-version }} -s functional -d mysql -a mysqli -j 5.5"
|
|
|
|
# TYPO3v12 has min requirement MySQL 8.0, so use this for minimum test compared to TYPO3v11 testing (MySQL 5.5) with mysqli
|
|
|
|
- name: "Run functional tests (MySQL 8.0 mysqli)"
|
|
|
|
if: "matrix.typo3-version == '12'"
|
|
|
|
run: "Build/Scripts/runTests.sh -t ${{ matrix.typo3-version }} -p ${{ matrix.php-version }} -s functional -d mysql -a mysqli -j 5.5"
|
|
|
|
- name: "Run functional tests (MySQL 8.0 pdo_mysql)"
|
|
|
|
run: "Build/Scripts/runTests.sh -t ${{ matrix.typo3-version }} -p ${{ matrix.php-version }} -s functional -d mysql -a pdo_mysql -j 8.0"
|
|
|
|
- name: "Run functional tests (MariaDB 10.2 mysqli)"
|
|
|
|
if: "matrix.typo3-version == '11'"
|
|
|
|
run: "Build/Scripts/runTests.sh -t ${{ matrix.typo3-version }} -p ${{ matrix.php-version }} -s functional -d mariadb -a mysqli -i 10.2"
|
|
|
|
# TYPO3v12 has min requirement MariaDB 10.3, so use this for minimum test compared to TYPO3v11 testing (MariaDB 10.2)
|
|
|
|
- name: "Run functional tests (MariaDB 10.3 mysqli)"
|
|
|
|
if: "matrix.typo3-version == '12'"
|
|
|
|
run: "Build/Scripts/runTests.sh -t ${{ matrix.typo3-version }} -p ${{ matrix.php-version }} -s functional -d mariadb -a mysqli -i 10.3"
|
|
|
|
- name: "Run functional tests (MariaDB 10.7 pdo_mysql)"
|
|
|
|
run: "Build/Scripts/runTests.sh -t ${{ matrix.typo3-version }} -p ${{ matrix.php-version }} -s functional -d mariadb -a pdo_mysql -i 10.7"
|
|
|
|
- name: "Run functional tests (PostgresSQL 10)"
|
|
|
|
run: "Build/Scripts/runTests.sh -t ${{ matrix.typo3-version }} -p ${{ matrix.php-version }} -s functional -d postgres -k 10"
|
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-10-16 02:10:20 +02:00
|
|
|
- typo3-version: "11"
|
2022-06-15 18:22:18 +02:00
|
|
|
php-version: "7.4"
|
2022-03-02 11:45:29 +01:00
|
|
|
composer-dependencies: lowest
|
2022-10-16 02:10:20 +02:00
|
|
|
- typo3-version: "11"
|
2022-10-09 06:15:42 +02:00
|
|
|
php-version: "7.4"
|
2022-03-02 11:45:29 +01:00
|
|
|
composer-dependencies: highest
|
2022-10-16 02:10:20 +02:00
|
|
|
- typo3-version: "11"
|
2022-06-15 18:22:18 +02:00
|
|
|
php-version: "8.0"
|
2022-03-02 11:45:29 +01:00
|
|
|
composer-dependencies: lowest
|
2022-10-16 02:10:20 +02:00
|
|
|
- typo3-version: "11"
|
2022-10-09 06:15:42 +02:00
|
|
|
php-version: "8.0"
|
2022-03-02 11:45:29 +01:00
|
|
|
composer-dependencies: highest
|
2022-10-16 02:10:20 +02:00
|
|
|
- typo3-version: "11"
|
|
|
|
php-version: "8.1"
|
|
|
|
composer-dependencies: lowest
|
|
|
|
- typo3-version: "11"
|
|
|
|
php-version: "8.1"
|
|
|
|
composer-dependencies: highest
|
|
|
|
- typo3-version: "12"
|
2022-06-15 18:22:18 +02:00
|
|
|
php-version: "8.1"
|
2022-03-02 11:45:29 +01:00
|
|
|
composer-dependencies: lowest
|
2022-10-16 02:10:20 +02:00
|
|
|
- typo3-version: "12"
|
2022-10-09 06:15:42 +02:00
|
|
|
php-version: "8.1"
|
|
|
|
composer-dependencies: highest
|