Skip to content

fix: Create test projects properly #235

fix: Create test projects properly

fix: Create test projects properly #235

name: functionaltests
on: [ push, pull_request ]
jobs:
unittests:
name: '[PHP ${{ matrix.php-version }} | Flow ${{ matrix.flow-version }}] Functional Tests'
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php-version: [ 8.3, 8.4, 8.5 ]
flow-version: [ "~8.3.0", "~9.0.0" ]
env:
APP_ENV: true
FLOW_CONTEXT: Testing/Functional
FLOW_DIST_FOLDER: flow-base-distribution
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: "Create composer project - No install"
run: composer create-project --prefer-dist --no-progress --no-install neos/flow-base-distribution ${{ env.FLOW_DIST_FOLDER }} "${{ matrix.flow-version }}"
- name: "Allow neos composer plugin"
run: composer config --no-plugins allow-plugins.neos/composer-plugin true
working-directory: ${{ env.FLOW_DIST_FOLDER }}
- name: "Create composer project - Require behat in compatible version"
run: composer require --dev --no-update "neos/behat:@dev"
working-directory: ${{ env.FLOW_DIST_FOLDER }}
- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
working-directory: ${{ env.FLOW_DIST_FOLDER }}
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-
- name: "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.Sentry
- name: Install netlogix/sentry
run: composer require netlogix/sentry:@dev
working-directory: ${{ env.FLOW_DIST_FOLDER }}
- name: Run tests
run: bin/phpunit -c DistributionPackages/Netlogix.Sentry/phpunit.xml.dist --testsuite="Functional" --bootstrap "Build/BuildEssentials/PhpUnit/FunctionalTestBootstrap.php"
working-directory: ${{ env.FLOW_DIST_FOLDER }}