Skip to content

Commit

Permalink
[UPDATE] Use unit and functional testing via script from typo3/testin…
Browse files Browse the repository at this point in the history
…g-framework
  • Loading branch information
manuelselbach committed Sep 20, 2023
1 parent e42567e commit 4d51109
Showing 1 changed file with 10 additions and 39 deletions.
49 changes: 10 additions & 39 deletions .github/workflows/Tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ jobs:

name: PHP ${{ matrix.php }}, TYPO3 ${{ matrix.typo3 }} tests
steps:
- name: Start database server
run: sudo /etc/init.d/mysql start

- name: Checkout
uses: actions/checkout@v2
Expand Down Expand Up @@ -69,40 +67,13 @@ jobs:
run: .Build/bin/phpcs --runtime-set ignore_warnings_on_exit true

- name: Unit tests
if: matrix.typo3 != 'dev-main'
run: |
if [ -d "Tests/Unit" ]; then
export "UNIT_XML"=.Build/vendor/typo3/testing-framework/Resources/Core/Build/UnitTests.xml
.Build/bin/phpunit Classes --coverage-clover=unittest-coverage.clover --colors -c $UNIT_XML Tests/Unit
else
echo "No unit test files."
fi
- name: Functional / integration tests
if: matrix.typo3 != 'dev-main'
run: |
if [ -d "Tests/Functional" ]; then
export "FUNCTIONAL_XML"=.Build/vendor/typo3/testing-framework/Resources/Core/Build/FunctionalTests.xml
.Build/bin/phpunit Classes --coverage-clover=functional-coverage.clover --colors -c $FUNCTIONAL_XML Tests/Functional
else
echo "No functional test files."
fi
env:
typo3DatabaseHost: 127.0.0.1
typo3DatabaseName: typo3
typo3DatabasePassword: root
typo3DatabaseUsername: root

- name: Tests for dev-main and PHP == 8.1
if: matrix.typo3 == 'dev-main' && matrix.php == '8.1'
continue-on-error: true
run: |
export "FUNCTIONAL_XML"=.Build/vendor/nimut/testing-framework/res/Configuration/FunctionalTests.xml
export "UNIT_XML"=.Build/vendor/nimut/testing-framework/res/Configuration/UnitTests.xml
.Build/bin/phpunit Classes --colors -c $UNIT_XML Tests/Unit
.Build/bin/phpunit Classes --colors -c $FUNCTIONAL_XML Tests/Functional
env:
typo3DatabaseHost: 127.0.0.1
typo3DatabaseName: typo3
typo3DatabasePassword: root
typo3DatabaseUsername: root
run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -s unit

- name: Functional tests with mariadb
run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -d mariadb -s functional

- name: Functional tests with postgres
run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -d postgres -s functional

- name: Functional tests with sqlite
run: Build/Scripts/runTests.sh -p ${{ matrix.php }} -d sqlite -s functional

0 comments on commit 4d51109

Please sign in to comment.