Skip to content

Commit 21b13b8

Browse files
committed
feat: Add test to actions
1 parent 3e1e714 commit 21b13b8

3 files changed

Lines changed: 58 additions & 0 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,3 +95,30 @@ jobs:
9595

9696
- name: Coding Guideline
9797
run: ./vendor/bin/ecs check
98+
tests:
99+
runs-on: ubuntu-latest
100+
needs:
101+
- xml-linting
102+
- check-composer
103+
strategy:
104+
matrix:
105+
include:
106+
- php-version: '8.3'
107+
typo3-version: '^13.4'
108+
steps:
109+
- uses: actions/checkout@v3
110+
111+
- name: Install PHP
112+
uses: shivammathur/setup-php@v2
113+
with:
114+
php-version: "${{ matrix.php-version }}"
115+
coverage: none
116+
tools: composer:v2
117+
env:
118+
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
119+
120+
- name: Install dependencies with expected TYPO3 version
121+
run: composer require --no-progress --no-interaction --optimize-autoloader "typo3/cms-core:${{ matrix.typo3-version }}"
122+
123+
- name: PHPUnit Tests
124+
run: ./vendor/bin/phpunit --testdox

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"phpoffice/phpspreadsheet": "^4"
2323
},
2424
"require-dev": {
25+
"typo3/testing-framework": "^9.0",
2526
"symplify/easy-coding-standard": "^12.4"
2627
},
2728
"config": {

phpunit.xml.dist

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?xml version="1.0"?>
2+
<phpunit
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/12.3/phpunit.xsd"
5+
backupGlobals="false"
6+
bootstrap="vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTestsBootstrap.php"
7+
colors="true"
8+
processIsolation="false"
9+
stopOnError="false"
10+
stopOnFailure="false"
11+
stopOnIncomplete="false"
12+
stopOnSkipped="false"
13+
>
14+
15+
<testsuites>
16+
<testsuite name="functional">
17+
<directory>Tests/Functional/</directory>
18+
</testsuite>
19+
</testsuites>
20+
21+
<source>
22+
<include>
23+
<directory suffix=".php">Classes</directory>
24+
</include>
25+
</source>
26+
27+
<php>
28+
<env name="typo3DatabaseDriver" value="pdo_sqlite"/>
29+
</php>
30+
</phpunit>

0 commit comments

Comments
 (0)