2022-09-27 10:35:40 +02:00
|
|
|
name: CI
|
2022-09-28 11:35:07 +02:00
|
|
|
|
2022-09-27 10:35:40 +02:00
|
|
|
on:
|
|
|
|
- pull_request
|
2022-09-28 11:35:07 +02:00
|
|
|
|
2022-09-27 10:35:40 +02:00
|
|
|
jobs:
|
|
|
|
check-composer:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-10-24 10:09:05 +02:00
|
|
|
- uses: actions/checkout@v3
|
2022-09-27 10:35:40 +02:00
|
|
|
|
2022-09-28 11:35:07 +02:00
|
|
|
- uses: cachix/install-nix-action@v17
|
2022-09-27 10:35:40 +02:00
|
|
|
with:
|
2022-09-28 11:35:07 +02:00
|
|
|
nix_path: nixpkgs=channel:nixos-unstable
|
2022-09-27 10:35:40 +02:00
|
|
|
|
|
|
|
- name: Validate composer.json
|
2022-09-28 11:35:07 +02:00
|
|
|
run: nix-shell --pure --run project-validate-composer
|
2022-09-27 10:35:40 +02:00
|
|
|
|
|
|
|
php-linting:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
php-version:
|
|
|
|
- 7.4
|
|
|
|
- 8.0
|
|
|
|
- 8.1
|
2024-02-16 00:04:45 +01:00
|
|
|
- 8.2
|
|
|
|
- 8.3
|
2022-09-27 10:35:40 +02:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-10-24 10:09:05 +02:00
|
|
|
uses: actions/checkout@v3
|
2022-09-27 10:35:40 +02:00
|
|
|
|
2022-09-28 11:35:07 +02:00
|
|
|
- name: Install PHP
|
|
|
|
uses: shivammathur/setup-php@v2
|
|
|
|
with:
|
|
|
|
php-version: "${{ matrix.php-version }}"
|
|
|
|
coverage: none
|
|
|
|
tools: composer:v2
|
|
|
|
|
2022-09-27 10:35:40 +02: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
|
|
|
|
steps:
|
2022-10-24 10:09:05 +02:00
|
|
|
- uses: actions/checkout@v3
|
2022-09-27 10:35:40 +02:00
|
|
|
|
2022-09-28 11:35:07 +02:00
|
|
|
- uses: cachix/install-nix-action@v17
|
2022-09-27 10:35:40 +02:00
|
|
|
with:
|
2022-09-28 11:35:07 +02:00
|
|
|
nix_path: nixpkgs=channel:nixos-unstable
|
2022-09-27 10:35:40 +02:00
|
|
|
|
2022-09-28 11:35:07 +02:00
|
|
|
- name: Validate XML
|
|
|
|
run: nix-shell --pure --run project-validate-xml
|
2022-09-27 10:35:40 +02:00
|
|
|
|
|
|
|
coding-guideline:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-10-24 10:09:05 +02:00
|
|
|
- uses: actions/checkout@v3
|
2022-09-27 10:35:40 +02:00
|
|
|
|
2022-09-28 11:35:07 +02:00
|
|
|
- uses: cachix/install-nix-action@v17
|
2022-09-27 10:35:40 +02:00
|
|
|
with:
|
2022-09-28 11:35:07 +02:00
|
|
|
nix_path: nixpkgs=channel:nixos-unstable
|
2022-09-27 10:35:40 +02:00
|
|
|
|
2022-09-28 11:35:07 +02:00
|
|
|
- name: Check Coding Guideline
|
|
|
|
run: nix-shell --pure --run project-coding-guideline
|
2022-09-27 10:35:40 +02:00
|
|
|
|
|
|
|
code-quality:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- php-version: '7.4'
|
2023-04-19 11:40:15 +02:00
|
|
|
typo3-version: '^11.5'
|
2022-09-27 10:35:40 +02:00
|
|
|
- php-version: '8.0'
|
2023-04-19 11:40:15 +02:00
|
|
|
typo3-version: '^11.5'
|
|
|
|
- php-version: '8.0'
|
|
|
|
typo3-version: '^11.5'
|
|
|
|
- php-version: '8.1'
|
|
|
|
typo3-version: '^11.5'
|
|
|
|
- php-version: '8.2'
|
|
|
|
typo3-version: '^11.5'
|
|
|
|
- php-version: '8.3'
|
|
|
|
typo3-version: '^11.5'
|
2022-09-27 10:35:40 +02:00
|
|
|
- php-version: '8.1'
|
2023-04-19 11:40:15 +02:00
|
|
|
typo3-version: '^12.4'
|
2024-02-16 00:04:45 +01:00
|
|
|
- php-version: '8.2'
|
2023-04-19 11:40:15 +02:00
|
|
|
typo3-version: '^12.4'
|
2024-02-16 00:04:45 +01:00
|
|
|
- php-version: '8.3'
|
2023-04-19 11:40:15 +02:00
|
|
|
typo3-version: '^12.4'
|
2022-09-27 10:35:40 +02:00
|
|
|
steps:
|
2022-10-24 10:09:05 +02:00
|
|
|
- uses: actions/checkout@v3
|
2022-09-27 10:35:40 +02:00
|
|
|
|
|
|
|
- name: Install PHP
|
|
|
|
uses: shivammathur/setup-php@v2
|
|
|
|
with:
|
|
|
|
php-version: "${{ matrix.php-version }}"
|
|
|
|
coverage: none
|
|
|
|
tools: composer:v2
|
|
|
|
|
2022-09-28 11:35:07 +02:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |-
|
2023-04-19 11:40:15 +02:00
|
|
|
composer req "typo3/cms-core:${{ matrix.typo3-version }}" --prefer-dist --no-progress --no-interaction
|
2022-09-28 11:35:07 +02:00
|
|
|
./vendor/bin/codecept build
|
2022-09-27 10:35:40 +02:00
|
|
|
|
|
|
|
- name: Code Quality (by PHPStan)
|
|
|
|
run: ./vendor/bin/phpstan analyse
|
|
|
|
|
|
|
|
tests-mysql:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- php-version: '7.4'
|
2023-04-19 11:40:15 +02:00
|
|
|
typo3-version: '^11.5'
|
2022-09-27 10:35:40 +02:00
|
|
|
- php-version: '8.0'
|
2023-04-19 11:40:15 +02:00
|
|
|
typo3-version: '^11.5'
|
|
|
|
- php-version: '8.1'
|
|
|
|
typo3-version: '^11.5'
|
|
|
|
- php-version: '8.2'
|
|
|
|
typo3-version: '^11.5'
|
|
|
|
- php-version: '8.3'
|
|
|
|
typo3-version: '^11.5'
|
2022-09-27 10:35:40 +02:00
|
|
|
- php-version: '8.1'
|
2023-04-19 11:40:15 +02:00
|
|
|
typo3-version: '^12.4'
|
2024-02-16 00:04:45 +01:00
|
|
|
- php-version: '8.2'
|
2023-04-19 11:40:15 +02:00
|
|
|
typo3-version: '^12.4'
|
2024-02-16 00:04:45 +01:00
|
|
|
- php-version: '8.3'
|
2023-04-19 11:40:15 +02:00
|
|
|
typo3-version: '^12.4'
|
2022-09-27 10:35:40 +02:00
|
|
|
steps:
|
2022-10-24 10:09:05 +02:00
|
|
|
- uses: actions/checkout@v3
|
2022-09-27 10:35:40 +02:00
|
|
|
|
|
|
|
- name: Install PHP
|
|
|
|
uses: shivammathur/setup-php@v2
|
|
|
|
with:
|
|
|
|
php-version: "${{ matrix.php-version }}"
|
|
|
|
coverage: none
|
|
|
|
tools: composer:v2
|
|
|
|
|
|
|
|
- name: Setup MySQL
|
|
|
|
uses: mirromutth/mysql-action@v1.1
|
|
|
|
with:
|
|
|
|
mysql version: '8'
|
|
|
|
mysql database: 'typo3'
|
|
|
|
mysql root password: 'root'
|
|
|
|
|
2022-09-28 11:35:07 +02:00
|
|
|
- name: Wait for MySQL
|
|
|
|
run: |
|
|
|
|
while ! mysqladmin ping --host=127.0.0.1 --password=root --silent; do
|
|
|
|
sleep 1
|
|
|
|
done
|
|
|
|
|
2022-09-27 10:35:40 +02:00
|
|
|
- name: Install dependencies
|
2023-04-19 11:40:15 +02:00
|
|
|
run: composer req "typo3/cms-core:${{ matrix.typo3-version }}" --prefer-dist --no-progress --no-interaction
|
2022-09-27 10:35:40 +02:00
|
|
|
|
|
|
|
- name: PHPUnit Tests
|
2022-09-28 11:35:07 +02:00
|
|
|
env:
|
|
|
|
typo3DatabaseDriver: "pdo_mysql"
|
|
|
|
typo3DatabaseName: "typo3"
|
|
|
|
typo3DatabaseHost: "127.0.0.1"
|
|
|
|
typo3DatabaseUsername: "root"
|
|
|
|
typo3DatabasePassword: "root"
|
|
|
|
run: ./vendor/bin/phpunit --testdox
|
|
|
|
|
|
|
|
tests-acceptance:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-10-24 10:09:05 +02:00
|
|
|
- uses: actions/checkout@v3
|
2022-09-28 11:35:07 +02:00
|
|
|
|
|
|
|
- uses: cachix/install-nix-action@v17
|
|
|
|
with:
|
|
|
|
nix_path: nixpkgs=channel:nixos-unstable
|
|
|
|
|
|
|
|
- name: Run Acceptance Tests
|
|
|
|
run: nix-shell --pure --run project-test-acceptance
|