Merge pull request #24 from netlogix/fix/dont-throw #79
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: functionaltests | |
on: [ push, pull_request ] | |
jobs: | |
unittests: | |
name: '[PHP ${{ matrix.php-version }} | Flow ${{ matrix.flow-version }} | MySQL ${{ matrix.mysql-version }}] Functional Tests' | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
php-version: [ 8.1, 8.2, 8.3 ] | |
flow-version: [ 8.3 ] | |
mysql-version: [5.7] | |
env: | |
APP_ENV: true | |
FLOW_CONTEXT: Testing/Functional | |
FLOW_DIST_FOLDER: flow-base-distribution | |
MYSQL_HOST: '127.0.0.1' | |
MYSQL_PORT: 3800 | |
MYSQL_DATABASE: 'flow' | |
MYSQL_USER: 'flow' | |
MYSQL_PASSWORD: 'flow' | |
steps: | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
extensions: mbstring, xml, json, zlib, iconv, intl, pdo_sqlite | |
ini-values: opcache.fast_shutdown=0 | |
- name: "[1/5] Create composer project - Cache composer dependencies" | |
uses: actions/cache@v4 | |
with: | |
path: ~/.composer/cache | |
key: php-${{ matrix.php-version }}-flow-${{ matrix.flow-version }}-composer-${{ hashFiles('composer.json') }} | |
restore-keys: | | |
php-${{ matrix.php-version }}-flow-${{ matrix.flow-version }}-composer- | |
php-${{ matrix.php-version }}-flow- | |
- name: "[2/5] Create composer project - No install" | |
run: composer create-project neos/flow-base-distribution ${{ env.FLOW_DIST_FOLDER }} --prefer-dist --no-progress --no-install "^${{ matrix.flow-version }}" | |
- name: "[3/5] Allow neos composer plugin" | |
run: composer config --no-plugins allow-plugins.neos/composer-plugin true | |
working-directory: ${{ env.FLOW_DIST_FOLDER }} | |
- name: "[4/5] Create composer project - Require behat in compatible version" | |
run: composer require --dev --no-update "neos/behat:@dev" | |
working-directory: ${{ env.FLOW_DIST_FOLDER }} | |
- name: "[5/5] Create composer project - Install project" | |
run: composer install | |
working-directory: ${{ env.FLOW_DIST_FOLDER }} | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
path: ${{ env.FLOW_DIST_FOLDER }}/DistributionPackages/Netlogix.JsonApiOrg.Consumer | |
- name: Install netlogix/jsonapiorg-consumer | |
run: composer require netlogix/jsonapiorg-consumer:@dev | |
working-directory: ${{ env.FLOW_DIST_FOLDER }} | |
- name: Set up MySQL | |
# Use haltuf's fork of mirromutth/mysql-action until https://github.com/mirromutth/mysql-action/pull/7 is merged | |
uses: haltuf/mysql-action@master | |
with: | |
'host port': ${{ env.MYSQL_PORT }} | |
'mysql version': ${{ matrix.mysql-version }} | |
'mysql database': ${{ env.MYSQL_DATABASE }} | |
'mysql user': ${{ env.MYSQL_USER }} | |
'mysql password': ${{ env.MYSQL_PASSWORD }} | |
- name: "Copy Settings.yaml.dist" | |
run: cp DistributionPackages/Netlogix.JsonApiOrg.Consumer/Settings.yaml.dist Configuration/Testing/Settings.yaml | |
working-directory: ${{ env.FLOW_DIST_FOLDER }} | |
- name: Run tests | |
run: bin/phpunit -c DistributionPackages/Netlogix.JsonApiOrg.Consumer/phpunit.xml.dist --testsuite="Functional" --bootstrap "Build/BuildEssentials/PhpUnit/FunctionalTestBootstrap.php" | |
working-directory: ${{ env.FLOW_DIST_FOLDER }} |