2021-02-01 09:12:41 +01:00
|
|
|
name: CI
|
2021-04-12 14:52:29 +02:00
|
|
|
on:
|
|
|
|
- pull_request
|
2021-02-01 09:12:41 +01:00
|
|
|
jobs:
|
|
|
|
check-composer:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-10-24 10:09:07 +02:00
|
|
|
- uses: actions/checkout@v3
|
2021-02-01 09:12:41 +01:00
|
|
|
|
|
|
|
- name: Validate composer.json
|
|
|
|
run: composer validate
|
|
|
|
|
|
|
|
php-linting:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
php-version:
|
2022-09-13 09:05:47 +02:00
|
|
|
- 8.1
|
2023-01-31 07:51:13 +01:00
|
|
|
- 8.2
|
2023-11-30 13:52:23 +01:00
|
|
|
- 8.3
|
2021-02-01 09:12:41 +01:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-10-24 10:09:07 +02:00
|
|
|
uses: actions/checkout@v3
|
2021-02-01 09:12:41 +01:00
|
|
|
|
|
|
|
- name: Install PHP
|
|
|
|
uses: shivammathur/setup-php@v2
|
|
|
|
with:
|
|
|
|
php-version: "${{ matrix.php-version }}"
|
2021-09-08 13:17:15 +02:00
|
|
|
tools: composer:v2
|
2021-02-01 09:12:41 +01:00
|
|
|
|
|
|
|
- name: PHP lint
|
|
|
|
run: "find *.php Classes Configuration Tests -name '*.php' -print0 | xargs -0 -n 1 -P 4 php -l"
|
|
|
|
|
|
|
|
xml-linting:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs: [check-composer]
|
|
|
|
steps:
|
2022-10-24 10:09:07 +02:00
|
|
|
- uses: actions/checkout@v3
|
2021-02-01 09:12:41 +01:00
|
|
|
|
|
|
|
- name: Install PHP
|
|
|
|
uses: shivammathur/setup-php@v2
|
|
|
|
with:
|
2023-11-30 13:52:23 +01:00
|
|
|
php-version: "8.2"
|
2021-09-08 13:17:15 +02:00
|
|
|
tools: composer:v2
|
2021-02-01 09:12:41 +01:00
|
|
|
|
|
|
|
- name: Install xmllint
|
|
|
|
run: sudo apt-get install libxml2-utils
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: composer install --prefer-dist --no-progress --no-suggest
|
|
|
|
|
|
|
|
- name: PHPUnit configuration file
|
|
|
|
run: xmllint --schema vendor/phpunit/phpunit/phpunit.xsd --noout phpunit.xml.dist
|
|
|
|
|
|
|
|
- name: Fetch schema for xliff
|
|
|
|
run: wget https://docs.oasis-open.org/xliff/v1.2/os/xliff-core-1.2-strict.xsd --output-document=.Build/xliff-core-1.2-strict.xsd
|
|
|
|
|
|
|
|
- name: TYPO3 language files
|
|
|
|
run: xmllint --schema .Build/xliff-core-1.2-strict.xsd --noout $(find Resources -name '*.xlf')
|
|
|
|
|
|
|
|
coding-guideline:
|
|
|
|
runs-on: ubuntu-latest
|
2021-04-13 14:43:04 +02:00
|
|
|
needs:
|
2022-09-13 09:05:47 +02:00
|
|
|
- php-linting
|
2021-02-01 09:12:41 +01:00
|
|
|
- xml-linting
|
|
|
|
steps:
|
2022-10-24 10:09:07 +02:00
|
|
|
- uses: actions/checkout@v3
|
2021-02-01 09:12:41 +01:00
|
|
|
|
|
|
|
- name: Install PHP
|
|
|
|
uses: shivammathur/setup-php@v2
|
|
|
|
with:
|
2023-11-30 13:52:23 +01:00
|
|
|
php-version: "8.2"
|
2021-09-08 13:17:15 +02:00
|
|
|
tools: composer:v2
|
2021-02-01 09:12:41 +01:00
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: composer install --prefer-dist --no-progress --no-suggest
|
|
|
|
|
|
|
|
- name: Coding Guideline
|
2023-11-30 13:52:23 +01:00
|
|
|
run: ./vendor/bin/php-cs-fixer fix --dry-run --diff
|
2021-02-01 09:12:41 +01:00
|
|
|
|
2021-02-03 15:06:16 +01:00
|
|
|
code-quality:
|
2021-02-01 09:12:41 +01:00
|
|
|
runs-on: ubuntu-latest
|
2022-09-13 09:05:47 +02:00
|
|
|
needs:
|
|
|
|
- php-linting
|
2021-09-09 15:09:30 +02:00
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-09-13 09:05:47 +02:00
|
|
|
include:
|
|
|
|
- php-version: '8.1'
|
2023-11-30 13:52:23 +01:00
|
|
|
typo3-version: '^12.4'
|
2023-01-31 07:51:13 +01:00
|
|
|
- php-version: '8.2'
|
2023-11-30 13:52:23 +01:00
|
|
|
typo3-version: '^12.4'
|
|
|
|
- php-version: '8.3'
|
|
|
|
typo3-version: '^12.4'
|
2021-02-01 09:12:41 +01:00
|
|
|
steps:
|
2022-10-24 10:09:07 +02:00
|
|
|
- uses: actions/checkout@v3
|
2021-02-01 09:12:41 +01:00
|
|
|
|
|
|
|
- name: Install PHP
|
|
|
|
uses: shivammathur/setup-php@v2
|
|
|
|
with:
|
2021-09-09 15:09:30 +02:00
|
|
|
php-version: "${{ matrix.php-version }}"
|
2021-09-08 13:17:15 +02:00
|
|
|
tools: composer:v2
|
2021-02-01 09:12:41 +01:00
|
|
|
|
2022-09-13 09:05:47 +02:00
|
|
|
- name: Install dependencies with expected TYPO3 version
|
2023-01-31 07:51:13 +01:00
|
|
|
run: |-
|
|
|
|
composer require --no-interaction --prefer-dist --no-progress "typo3/cms-backend:${{ matrix.typo3-version }}" "typo3/cms-core:${{ matrix.typo3-version }}" "typo3/cms-extbase:${{ matrix.typo3-version }}" "typo3/cms-frontend:${{ matrix.typo3-version }}" "typo3/cms-fluid-styled-content:${{ matrix.typo3-version }}"
|
|
|
|
./vendor/bin/codecept build
|
2021-02-01 09:12:41 +01:00
|
|
|
|
2021-02-03 15:06:16 +01:00
|
|
|
- name: Code Quality (by PHPStan)
|
|
|
|
run: ./vendor/bin/phpstan analyse
|
2021-02-01 09:12:41 +01:00
|
|
|
|
2022-09-13 09:05:47 +02:00
|
|
|
tests-mysql:
|
2021-09-08 12:12:25 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
needs:
|
2022-09-13 09:05:47 +02:00
|
|
|
- php-linting
|
2021-09-08 12:12:25 +02:00
|
|
|
- xml-linting
|
|
|
|
strategy:
|
|
|
|
matrix:
|
2022-09-13 09:05:47 +02:00
|
|
|
include:
|
|
|
|
- php-version: '8.1'
|
2023-11-30 13:52:23 +01:00
|
|
|
typo3-version: '^12.4'
|
2022-09-13 09:05:47 +02:00
|
|
|
db-version: '8'
|
2023-01-31 07:51:13 +01:00
|
|
|
- php-version: '8.2'
|
2023-11-30 13:52:23 +01:00
|
|
|
typo3-version: '^12.4'
|
|
|
|
db-version: '8'
|
|
|
|
- php-version: '8.3'
|
|
|
|
typo3-version: '^12.4'
|
2023-01-31 07:51:13 +01:00
|
|
|
db-version: '8'
|
2021-09-08 12:12:25 +02:00
|
|
|
steps:
|
2022-10-24 10:09:07 +02:00
|
|
|
- uses: actions/checkout@v3
|
2021-09-08 12:12:25 +02:00
|
|
|
|
|
|
|
- name: Install PHP
|
|
|
|
uses: shivammathur/setup-php@v2
|
|
|
|
with:
|
|
|
|
php-version: "${{ matrix.php-version }}"
|
2021-09-08 13:17:15 +02:00
|
|
|
tools: composer:v2
|
2021-09-08 12:12:25 +02:00
|
|
|
|
|
|
|
- name: Setup MySQL
|
|
|
|
uses: mirromutth/mysql-action@v1.1
|
|
|
|
with:
|
2023-11-30 13:52:23 +01:00
|
|
|
mysql version: "${{ matrix.db-version }}"
|
2021-09-08 12:12:25 +02:00
|
|
|
mysql database: 'typo3'
|
|
|
|
mysql root password: 'root'
|
|
|
|
|
2023-11-30 13:52:23 +01:00
|
|
|
- name: Wait for MySQL
|
|
|
|
run: |
|
|
|
|
while ! mysqladmin ping --host=127.0.0.1 --password=root --silent; do
|
|
|
|
sleep 1
|
|
|
|
done
|
|
|
|
|
2021-09-08 12:12:25 +02:00
|
|
|
- name: Install dependencies
|
2022-09-13 09:05:47 +02:00
|
|
|
run: composer require --no-interaction --prefer-dist --no-progress "typo3/cms-backend:${{ matrix.typo3-version }}" "typo3/cms-core:${{ matrix.typo3-version }}" "typo3/cms-extbase:${{ matrix.typo3-version }}" "typo3/cms-frontend:${{ matrix.typo3-version }}" "typo3/cms-fluid-styled-content:${{ matrix.typo3-version }}"
|
2021-09-08 12:12:25 +02:00
|
|
|
|
|
|
|
- name: PHPUnit Tests
|
|
|
|
run: |-
|
|
|
|
export typo3DatabaseDriver="pdo_mysql"
|
|
|
|
export typo3DatabaseName="typo3"
|
|
|
|
export typo3DatabaseHost="127.0.0.1"
|
|
|
|
export typo3DatabaseUsername="root"
|
|
|
|
export typo3DatabasePassword="root"
|
2023-11-30 13:52:23 +01:00
|
|
|
./vendor/bin/phpunit
|
|
|
|
|
|
|
|
tests-acceptance:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- uses: cachix/install-nix-action@v24
|
|
|
|
with:
|
|
|
|
nix_path: nixpkgs=channel:nixos-unstable
|
|
|
|
|
|
|
|
- name: Run Acceptance Tests
|
|
|
|
run: nix-shell --run project-test-acceptance
|