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:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
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
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
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:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
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:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
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'
|
|
|
|
- php-version: '8.0'
|
|
|
|
- php-version: '8.1'
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- 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: |-
|
|
|
|
composer require --no-interaction --prefer-dist --no-progress
|
|
|
|
./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'
|
|
|
|
- php-version: '8.0'
|
|
|
|
- php-version: '8.1'
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- 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
|
2022-09-28 11:35:07 +02:00
|
|
|
run: composer install --no-interaction --prefer-dist --no-progress
|
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:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- 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
|