Skip to content

Commit

Permalink
V4 (#34)
Browse files Browse the repository at this point in the history
  • Loading branch information
ayacoo authored Oct 26, 2024
1 parent 7e959fb commit 33108e6
Show file tree
Hide file tree
Showing 38 changed files with 2,697 additions and 109 deletions.
25 changes: 19 additions & 6 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
/.github/ export-ignore
/Build/ export-ignore
/Tests/ export-ignore
/.Build/ export-ignore
/.ddev/ export-ignore
/.editorconfig export-ignore
/.eslintignore export-ignore
/.eslintrc.json export-ignore
/.gitattributes export-ignore
/.github/ export-ignore
/.gitignore export-ignore
/.scrutinizer export-ignore
/.styleci.yml export-ignore
/.travis.yml export-ignore
/.gitlab/ export-ignore
/.php-cs-fixer.php export-ignore
/.phpstorm.meta.php export-ignore
/.prettierrc.js export-ignore
/Build/ export-ignore
/Configuration/FunctionalTests.xml export-ignore
/Configuration/UnitTests.xml export-ignore
/Tests/ export-ignore
/package.json export-ignore
/phive.xml export-ignore
/phpcs.xml export-ignore
/phpstan-baseline.neon export-ignore
/phpstan.neon export-ignore
/stylelint.config.js export-ignore
/tools/ export-ignore binary
155 changes: 155 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
---
# 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
on:
push:
branches:
- main
- v4
pull_request:
permissions:
contents: read
packages: read
jobs:
php-lint:
name: "PHP linter"
runs-on: ubuntu-22.04
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Install PHP"
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
coverage: none
tools: composer:v2
- name: "Show the Composer configuration"
run: "composer config --global --list"
- name: "Run PHP lint"
run: "composer ci:php:lint"
strategy:
fail-fast: false
matrix:
php-version:
- "8.2"
- "8.3"
code-quality:
name: "Code quality checks"
runs-on: ubuntu-22.04
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Install PHP"
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
coverage: none
tools: composer:v2
- name: "Show Composer version"
run: "composer --version"
- name: "Show the Composer configuration"
run: "composer config --global --list"
- name: "Cache dependencies installed with composer"
uses: actions/cache@v4
with:
key: "php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}"
path: ~/.cache/composer
restore-keys: "php${{ matrix.php-version }}-composer-\n"
- name: "Install Composer dependencies"
run: "composer update --no-progress"
- name: "Run command"
run: "composer ci:${{ matrix.command }}"
strategy:
fail-fast: false
matrix:
command:
- "php:csfix"
- "php:sniff"
- "ts:lint"
- "xliff:lint"
- "php:stan"
php-version:
- "8.2"
- "8.3"
unit-tests:
name: "Unit tests"
runs-on: ubuntu-22.04
needs: php-lint
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Install PHP"
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
coverage: none
tools: composer:v2
- name: "Show Composer version"
run: "composer --version"
- name: "Show the Composer configuration"
run: "composer config --global --list"
- name: "Cache dependencies installed with composer"
uses: actions/cache@v4
with:
key: "php${{ matrix.php-version }}-typo3${{ matrix.typo3-version }}-${{ matrix.composer-dependencies }}-composer-${{ hashFiles('**/composer.json') }}"
path: ~/.cache/composer
restore-keys: "php${{ matrix.php-version }}-typo3${{ matrix.typo3-version }}-${{ matrix.composer-dependencies }}-composer-\n"
- name: "Install TYPO3 Core"
env:
TYPO3: "${{ matrix.typo3-version }}"
run: |
composer require --no-ansi --no-interaction --no-progress --no-install typo3/cms-core:"$TYPO3"
composer show
- name: "Install highest dependencies with composer"
if: "matrix.composer-dependencies == 'highest'"
run: |
composer update --no-ansi --no-interaction --no-progress --with-dependencies
composer show
- name: "Run unit tests"
run: "composer ci:tests:unit"
strategy:
fail-fast: false
matrix:
include:
- typo3-version: "^13.4"
php-version: "8.2"
composer-dependencies: highest
- typo3-version: "^13.4"
php-version: "8.3"
composer-dependencies: highest
functional-tests:
name: "Functional tests"
runs-on: ubuntu-22.04
needs: php-lint
strategy:
# This prevents cancellation of matrix job runs, if one/two already failed and let the
# rest matrix jobs be executed anyway.
fail-fast: false
matrix:
php: [ '8.2', '8.3' ]
composerInstall: [ 'composerInstallHighest' ]
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install testing system
run: Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php }} -s ${{ matrix.composerInstall }}

- name: Functional Tests with mariadb (min)
run: Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php }} -d mariadb -i 10.4 -s functional

- name: Functional Tests with mariadb (max)
run: Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php }} -d mariadb -i 10.11 -s functional

- name: Functional Tests with mysql (min/max)
run: Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php }} -d mysql -i 8.0 -s functional

- name: Functional Tests with postgres (min)
run: Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php }} -d postgres -i 10 -s functional

- name: Functional Tests with postgres (max)
run: Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php }} -d postgres -i 16 -s functional

- name: Functional Tests with sqlite
run: Build/Scripts/runTests.sh -t 13 -p ${{ matrix.php }} -d sqlite -s functional
11 changes: 7 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
/.Build
/Build/Local/.phpunit.result.cache
.cache
/composer.lock
/composer.json.testing
/.php_cs.cache
/Documentation-GENERATED-temp
/Tests/Build/.phpunit.result.cache
/.php-cs-fixer.cache
.DS_Store
/.idea
.idea/
.fleet/
/var/
Build/testing-docker/.env
1 change: 1 addition & 0 deletions .php-cs-fixer.cache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"php":"8.2.19","version":"3.58.1:v3.58.1#04e9424025677a86914b9a4944dbbf4060bb0aff","indent":" ","lineEnding":"\n","rules":{"doctrine_annotation_array_assignment":{"operator":":"},"doctrine_annotation_braces":true,"doctrine_annotation_indentation":true,"doctrine_annotation_spaces":{"before_array_assignments_colon":false},"blank_line_after_namespace":true,"braces_position":true,"class_definition":true,"constant_case":true,"control_structure_braces":true,"control_structure_continuation_position":true,"elseif":true,"function_declaration":true,"indentation_type":true,"line_ending":true,"lowercase_keywords":true,"method_argument_space":{"on_multiline":"ensure_fully_multiline"},"no_break_comment":true,"no_closing_tag":true,"no_multiple_statements_per_line":true,"no_space_around_double_colon":true,"no_spaces_after_function_name":true,"no_trailing_whitespace":true,"no_trailing_whitespace_in_comment":true,"single_blank_line_at_eof":true,"single_class_element_per_statement":{"elements":["property"]},"single_import_per_statement":true,"single_line_after_imports":true,"spaces_inside_parentheses":true,"statement_indentation":true,"switch_case_semicolon_to_colon":true,"switch_case_space":true,"visibility_required":{"elements":["method","property"]},"encoding":true,"full_opening_tag":true,"array_syntax":{"syntax":"short"},"blank_line_after_opening_tag":true,"braces":{"allow_single_line_closure":true},"cast_spaces":{"space":"none"},"compact_nullable_typehint":true,"concat_space":{"spacing":"one"},"declare_equal_normalize":{"space":"none"},"dir_constant":true,"function_to_constant":{"functions":["get_called_class","get_class","get_class_this","php_sapi_name","phpversion","pi"]},"function_typehint_space":true,"lowercase_cast":true,"modernize_types_casting":true,"native_function_casing":true,"new_with_braces":true,"no_alias_functions":true,"no_blank_lines_after_phpdoc":true,"no_empty_phpdoc":true,"no_empty_statement":true,"no_extra_blank_lines":true,"no_leading_import_slash":true,"no_leading_namespace_whitespace":true,"no_null_property_initialization":true,"no_short_bool_cast":true,"no_singleline_whitespace_before_semicolons":true,"no_superfluous_elseif":true,"no_trailing_comma_in_singleline_array":true,"no_unneeded_control_parentheses":true,"no_unused_imports":true,"no_useless_else":true,"no_whitespace_in_blank_line":true,"ordered_imports":true,"php_unit_construct":{"assertions":["assertEquals","assertSame","assertNotEquals","assertNotSame"]},"php_unit_mock_short_will_return":true,"php_unit_test_case_static_method_calls":{"call_type":"self"},"phpdoc_no_access":true,"phpdoc_no_empty_return":true,"phpdoc_no_package":true,"phpdoc_scalar":true,"phpdoc_trim":true,"phpdoc_types":true,"phpdoc_types_order":{"null_adjustment":"always_last","sort_algorithm":"none"},"return_type_declaration":{"space_before":"none"},"single_quote":true,"single_line_comment_style":{"comment_types":["hash"]},"single_trait_insert_per_statement":true,"trailing_comma_in_multiline":{"elements":["arrays"]},"whitespace_after_comma_in_array":true,"yoda_style":{"equal":false,"identical":false,"less_and_greater":false}},"hashes":{"Build\/phpunit\/FunctionalTestsBootstrap.php":"67775c325d9f7d89fbe602ef26bcf693","Build\/phpunit\/UnitTestsBootstrap.php":"7ac3592092d6a62519aa070e92e7fb3e","Build\/php-cs-fixer\/php-cs-fixer.php":"c5247f77ac9eb121e6c839306717b471","public\/typo3\/index.php":"73316f95f833758b7b12a54bfde58549","public\/index.php":"018e726396942106e0a53130b1ca7f73","Resources\/Examples\/comprehend.php":"969abbfff68c1c5024ea1910fae304bd","Resources\/Examples\/detectLabels.php":"2681edcac23ce9daecd6c64635c6c6f2","Resources\/Examples\/textract.php":"b2587c1b82815df2777b46ad41d06ae4","Resources\/Examples\/transcribe.php":"2c7b0756fe96e0b66081a3e4728025d7","Resources\/Examples\/detectText.php":"fdb904131ccf872531501908dd1e95b0","Configuration\/TCA\/Overrides\/sys_file_metadata.php":"01e6c11a79497bf2498d1ffba203fa32","Classes\/EventListener\/AfterFileAddedEventListener.php":"d204b5c5734a632934ee018af8c5f679","Classes\/Service\/AwsImageRecognizeService.php":"3dbf95ae32cf04c8c4a249010cb63a93","Classes\/Event\/ModifyValidatorEvent.php":"1c2dd612c7007974713761385aad7924","Classes\/Event\/ModifyReportServiceEvent.php":"2e84bec82ebb3c55cdc7bec9efb87463","Classes\/Service\/Validator\/AbstractVideoValidatorInterface.php":"ada5a0d65b3faf4b050e88cefe297d56","Classes\/Service\/Validator\/AbstractVideoValidator.php":"4fd25532f041a013bf96df32315e1961","Classes\/Service\/Validator\/VimeoValidator.php":"862c30bb6eb7753a517403c017f254b9","Classes\/Service\/Validator\/YoutubeValidator.php":"82a67f5dfc63d2245ea9e8f7ee4843bd","Classes\/Service\/VideoService.php":"641d4e56d72e812fc564503904023f5c","Classes\/Service\/Report\/AbstractReportServiceInterface.php":"2527247ebed271988cbef24763cb84a6","Classes\/Service\/Report\/EmailReportService.php":"1ccf17cb51d59c15826dfdefef9ce99b","Classes\/Command\/ReportCommand.php":"5103d92250eef4104bf333d3a2d750e3","Classes\/Command\/ValidatorCommand.php":"da722a705ffb75b800f80047ee38b7f6","Classes\/Command\/CountCommand.php":"fcb29000733c81c6c5b644a6bd84bc49","Classes\/Command\/ResetCommand.php":"ce36df291fe516cb7eaca785f938c901","Classes\/Domain\/Repository\/FileRepository.php":"10524e697bcbb83819737eba82d84ebe","Classes\/Domain\/Dto\/ValidatorDemand.php":"dc00a5518ee96bafb1646e649d6e669a","ext_localconf.php":"8d2a7c7f05899dc182511e49c7f16ce7","ext_emconf.php":"d3cf4a36c6d0d3c3585f8f350f757128","Tests\/Functional\/Domain\/Repository\/FileRepositoryTest.php":"69687248055594486275eca929420666","Tests\/Unit\/Service\/Validator\/YoutubeValidatorTest.php":"6e762e976c4036e295a34c45c391d39d","Tests\/Unit\/Service\/Validator\/VimeoValidatorTest.php":"11daa6f2eee2e3a77325e027601b8185"}}
Loading

0 comments on commit 33108e6

Please sign in to comment.