Skip to content

Commit

Permalink
[FEATURE] Implemented base structure for the whole build and testing …
Browse files Browse the repository at this point in the history
…process, executed updated php-cs-fixer settings on all files, restructured lots of classes to make them ready for testing (WIP)
  • Loading branch information
Riny van Tiggelen committed Oct 11, 2024
1 parent 80ff266 commit 044ffab
Show file tree
Hide file tree
Showing 114 changed files with 3,149 additions and 1,751 deletions.
67 changes: 0 additions & 67 deletions .Build/.php-cs-fixer.php

This file was deleted.

12 changes: 0 additions & 12 deletions .Build/phpstan.cms12.neon

This file was deleted.

Binary file modified .DS_Store
Binary file not shown.
39 changes: 0 additions & 39 deletions .github/workflows/ci.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ jobs:
echo ::set-output name=version::${GITHUB_REF/refs\/tags\//}
- name: Publish to TER
run: TYPO3_API_USERNAME=${{ secrets.TYPO3_API_USERNAME }} TYPO3_API_PASSWORD=${{ secrets.TYPO3_API_PASSWORD }} TYPO3_API_TOKEN=$(awk '/Access token:(.*)/ { print $3 }' token.txt) TYPO3_EXCLUDE_FROM_PACKAGING=./.Build/ExcludeFromPackaging.php vendor/bin/tailor ter:publish --comment "Check https://github.com/Yoast/Yoast-SEO-for-TYPO3/blob/master/CHANGELOG.md for the latest changes." ${{ steps.get-version.outputs.version }} yoast_seo
run: TYPO3_API_USERNAME=${{ secrets.TYPO3_API_USERNAME }} TYPO3_API_PASSWORD=${{ secrets.TYPO3_API_PASSWORD }} TYPO3_API_TOKEN=$(awk '/Access token:(.*)/ { print $3 }' token.txt) TYPO3_EXCLUDE_FROM_PACKAGING=./Build/ExcludeFromPackaging.php vendor/bin/tailor ter:publish --comment "Check https://github.com/Yoast/Yoast-SEO-for-TYPO3/blob/main/CHANGELOG.md for the latest changes." ${{ steps.get-version.outputs.version }} yoast_seo
54 changes: 54 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Tests

on: [push, pull_request]

jobs:
tests:
name: Tests
runs-on: ubuntu-latest
strategy:
matrix:
php: ['8.2', '8.3']
typo3: ['11', '12', '13']
composerInstall: ['composerInstallLowest', 'composerInstallHighest']
include:
- typo3: '11'
php: '8.0'
composerInstall: 'composerInstallLowest'
- typo3: '11'
php: '8.0'
composerInstall: 'composerInstallHighest'
- typo3: '11'
php: '8.1'
composerInstall: 'composerInstallLowest'
- typo3: '11'
php: '8.1'
composerInstall: 'composerInstallHighest'
- typo3: '12'
php: '8.1'
composerInstall: 'composerInstallLowest'
- typo3: '12'
php: '8.1'
composerInstall: 'composerInstallHighest'

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Composer validate
run: Build/Scripts/runTests.sh -t ${{ matrix.typo3 }} -p ${{ matrix.php }} -s composerValidate

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

- name: Composer normalize
run: Build/Scripts/runTests.sh -t ${{ matrix.typo3 }} -p ${{ matrix.php }} -s composerNormalize -n

- name: Lint PHP
run: Build/Scripts/runTests.sh -t ${{ matrix.typo3 }} -p ${{ matrix.php }} -s lint

- name: CGL
run: Build/Scripts/runTests.sh -n -t ${{ matrix.typo3 }} -p ${{ matrix.php }} -s cgl -n

- name: PHPStan
run: Build/Scripts/runTests.sh -t ${{ matrix.typo3 }} -p ${{ matrix.php }} -s phpstan -e "--error-format=github"
13 changes: 5 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,12 @@ grunt/node_modules
*.po
vendor
composer.lock
.php_cs.cache
.php-cs-fixer.cache
yarn.lock
.Build/*
!.Build/ExcludeFromPackaging.php
!.Build/.php-cs-fixer.php
!.Build/.phplint.yml
!.Build/phpstan.cms11.neon
!.Build/phpstan.cms12.neon
!.Build/phpstan.cms13.neon
.Build
Documentation-GENERATED-temp
/public
.phplint.cache
.cache
composer.json.testing
var
17 changes: 17 additions & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;
use TYPO3\CodingStandards\CsFixerConfig;

$config = CsFixerConfig::create();
/// TODO: This construction can be removed when 11 support is dropped
if (method_exists($config, 'setParallelConfig')) {
$config->setParallelConfig(ParallelConfigFactory::detect());
} else {
// Old TYPO3 config standards so manually add some rules
$config->addRules([
'single_line_empty_body' => true
]);
}
$config->getFinder()->in('Classes')->in('Configuration')->in('Tests');
return $config;
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
'tests',
'vendor',
'.Build',
'grunt'
'Build',
'grunt',
],
'files' => [
'.gitignore',
Expand Down Expand Up @@ -57,6 +58,6 @@
'travis.yml',
'webpack.config.js',
'webpack.mix.js',
'yarn.lock'
]
'yarn.lock',
],
];
Loading

0 comments on commit 044ffab

Please sign in to comment.