Skip to content

Commit

Permalink
[TASK] Add functional test workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ayacoo committed Feb 10, 2024
1 parent 76ac956 commit 8145c45
Show file tree
Hide file tree
Showing 3 changed files with 685 additions and 56 deletions.
68 changes: 13 additions & 55 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,61 +121,19 @@ jobs:
name: "Functional tests"
runs-on: ubuntu-22.04
needs: php-lint
env:
DB_DATABASE: typo3
DB_USER: root
DB_PASSWORD: root
DB_HOST: localhost
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Install PHP"
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php-version }}"
tools: composer:v2
extensions: mysqli
coverage: none
- 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: "Start MySQL"
run: "sudo /etc/init.d/mysql start"
- name: "Run functional tests"
run: |
export typo3DatabaseName="$DB_DATABASE";
export typo3DatabaseHost="$DB_HOST";
export typo3DatabaseUsername="$DB_USER";
export typo3DatabasePassword="$DB_PASSWORD";
composer ci:tests:functional
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:
include:
- typo3-version: "^12.4"
php-version: "8.1"
composer-dependencies: highest
- typo3-version: "^12.4"
php-version: "8.2"
composer-dependencies: highest
- typo3-version: "^12.4"
php-version: "8.3"
composer-dependencies: highest
php: [ '8.1', '8.2', '8.3' ]
composerInstall: [ 'composerInstallLowest', 'composerInstallHighest' ]
steps:
- name: Checkout
uses: actions/checkout@v3

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

- name: Functional Tests with mariadb and mysqli
run: Build/Scripts/runTests.sh -t 12 -p ${{ matrix.php }} -d mariadb -a mysqli -s functional
Loading

0 comments on commit 8145c45

Please sign in to comment.