mirror of https://github.com/FriendsOfTYPO3/tea.git synced 2024-11-15 15:36:12 +01:00
Mirror of TYPO3 Extension tea, managed by the Best Practice Team https://typo3.org/community/teams/best-practices
Find a file
Stefan Bürk 71bc7e137d [TASK] Introduce Build/Scripts/runTests.sh adoption
This change adopts the well known runTests.sh from TYPO3 core
and related extensions as basic scripts and test execution
center. Main benefit of this implemenation is, that these
commands are behaving the same on all systems and ci, thus
increasing interoperability and easier transforming of commands
between systems - which ease the way to rerun or debug failed
tests locally after detected in ci (GitHub Actions, Gitlab CI).

Available suits and options are aligned to this project needs,
and will be updated if needed. To display available commands:

```shell
Build/Scripts/runTests.sh -h
```

Generic tasks and options (incomplete):

* `-s composerInstall` normal install, for code quality checks

* `-s composerInstallLowest` and `-s composerInstallHighest` to
  install dependencies with lowest and highest possibilities for
  all dependencies, based on selected php-version, core-version
  and so on. This helps to build fast a wide range of testing
  matrix for unit- and functional tests

* `-p <7.4|8.0|8.1|8.2>` defines which php version is used for
  executed php and composer scripts, like unit or functional
  tests, composer installs and so on

* ensure support for following databases for functional tests:

  - postgres <10|11|12|13|14> default: 10
  - mysql <5.5|5.6|5.7|8.0> default: 5.5
  - mariadb <10.2|10.3|10.4|10.5|10.6|10.7> default: 10.2
  - sqlite

  This can be controlled with a couple of options:
    -d <sqlite|mariadb|mysql|postgres>
    -a <mysqli|pdo_mysql> (for -d mysql or -d mariadb)
    -i <10.2|10.3|10.4|10.5|10.6|10.7> (for -d mariadb)
    -j <5.5|5.6|5.7|8.0> (for -d mysql)
    -k <10|11|12|13|14> (for -d postgres)

* selection of core can be choosen with the `-t` flag,
  also only v11 currently available. This is already
  a preparation for multi-core testing or for further
  version shiftings.

* included cgl (php cs fixer) with dryrun as suite
* add phpstan and phpstan generate baseline suites

Resolves #94
2022-10-16 03:49:32 +02:00
.ddev [TASK] Update PHP in DDEV to 8.1 (#561) 2022-09-07 11:54:24 +02:00
.github [TASK] Avoid race condition on case-insensitive filesystems 2022-10-16 01:55:38 +02:00
.gitlab [FEATURE] Add unit tests for v11 to gitlab ci (#607) 2022-10-05 15:52:28 +02:00
Build [TASK] Introduce Build/Scripts/runTests.sh adoption 2022-10-16 03:49:32 +02:00
Classes [CLEANUP] Drop usages of ObjectManager whereever possible (#616) 2022-10-10 02:15:33 +02:00
Configuration [TASK] Make the TCA ready for TYPO3 v12 (#625) 2022-10-12 11:10:13 +02:00
Documentation [TASK] Avoid using testing-framework boilerplate files 2022-10-16 01:55:38 +02:00
Resources [TASK] Replace switchable controller actions (#575) 2022-09-27 11:53:43 +02:00
Tests [TASK] Upgrade to the testing framework V7 (#629) 2022-10-13 13:52:25 +02:00
tools [TASK] Upgrade to PHPUnit 9 (#610) 2022-10-09 06:19:32 +02:00
.editorconfig Change default rst indentation to 4 spaces (#508) 2022-08-20 13:59:53 +02:00
.eslintignore [TASK] Move npm tools and config to default places (#445) 2022-05-18 17:17:45 +02:00
.eslintrc.json [TASK] Improved ESLint config for Backend JavaScript (#476) 2022-07-08 12:43:19 +02:00
.gitattributes [TASK] Remove the ancient acceptance tests (#512) 2022-08-28 09:33:50 +02:00
.gitignore [TASK] Introduce Build/Scripts/runTests.sh adoption 2022-10-16 03:49:32 +02:00
.php-cs-fixer.php [TASK] Migrate to typo3 coding standards (#340) 2021-11-17 16:45:49 +01:00
.phpstorm.meta.php [BUGFIX] Add hidden files to find in PHP lint (#559) 2022-09-07 11:47:31 +02:00
.prettierrc.js [TASK] Move npm tools and config to default places (#445) 2022-05-18 17:17:45 +02:00
CHANGELOG.md [FEATURE] Allow installations with TYPO3 12LTS (#637) 2022-10-15 21:40:20 +02:00
CODE_OF_CONDUCT.md [TASK] Switch to the TYPO3 Code of Conduct (#430) 2022-04-14 18:11:50 +02:00
composer.json [TASK] Avoid using testing-framework boilerplate files 2022-10-16 01:55:38 +02:00
ext_emconf.php [FEATURE] Allow installations with TYPO3 12LTS (#637) 2022-10-15 21:40:20 +02:00
ext_localconf.php [TASK] Replace switchable controller actions (#575) 2022-09-27 11:53:43 +02:00
ext_tables.sql [CLEANUP] Autoformat all files (#175) 2020-12-01 23:12:34 +01:00
LICENSE [TASK] Change from GPL V3+ to GPL V2+ (#40) 2019-08-08 12:38:56 +02:00
package.json Update eslint requirement from ^8.24.0 to ^8.25.0 (#618) 2022-10-09 11:24:41 +02:00
phive.xml [TASK] Upgrade to PHPUnit 9 (#610) 2022-10-09 06:19:32 +02:00
phpcs.xml [TASK] Remove the ancient acceptance tests (#512) 2022-08-28 09:33:50 +02:00
phpstan-baseline.neon [TASK] Introduce Build/Scripts/runTests.sh adoption 2022-10-16 03:49:32 +02:00
phpstan.neon [TASK] Remove the ancient acceptance tests (#512) 2022-08-28 09:33:50 +02:00
README.md [BUGFIX] Fix the license badge in the README (#633) 2022-10-15 18:08:12 +02:00
stylelint.config.js [TASK] Move npm tools and config to default places (#445) 2022-05-18 17:17:45 +02:00

Example TYPO3 extension for code quality checks and automated tests

TYPO3 V11 License Total downloads GitHub CI status GitLab CI status Coverage Status

This TYPO3 extension, based on Extbase and Fluid, is an example of best practices in automated code checks, unit/functional/acceptance testing and continuous integration.

You can also use this extension to manage your collection of delicious teas.

URL
Repository: https://github.com/TYPO3-Documentation/tea
Read online: https://docs.typo3.org/p/ttn/tea/main/en-us/
TER: https://extensions.typo3.org/extension/tea/
Slack: https://typo3.slack.com/channels/qa-best-practices

Presentation at the TYPO3 Online Days 2021

At the TYPO3 Online Days 2021, Oliver Klee held a session where her presented our approach for automating the code quality of extensions.

Slides

cover slide

Video recording

video still