Skip to content

Merge pull request #15 from netlogix/feat/keep-failed-jobs-after-retries #80

Merge pull request #15 from netlogix/feat/keep-failed-jobs-after-retries

Merge pull request #15 from netlogix/feat/keep-failed-jobs-after-retries #80

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: [ 7.4, 8.0, 8.1 ]
flow-version: [ 5.3, 6.3, 7.3, 8.0 ]
mysql-version: [5.7, 8.0]
exclude:
# Disable Flow 5.3 and 6.3 on PHP 8.0, as only ^7.2 is supported
- php-version: 8.0
flow-version: 5.3
- php-version: 8.0
flow-version: 6.3
- php-version: 8.1
flow-version: 5.3
- php-version: 8.1
flow-version: 6.3
# Disable Flow 7.0 on PHP 7.2, as 7.3 is required
- php-version: 7.2
flow-version: 7.3
# Disable Flow 8.0 on PHP 7, as 8.0 is required
- php-version: 7.2
flow-version: 8.0
- php-version: 7.3
flow-version: 8.0
- php-version: 7.4
flow-version: 8.0
services:
mysql:
image: 'mysql:${{ matrix.mysql-version }}'
env:
MYSQL_USER: flow
MYSQL_PASSWORD: flow
MYSQL_DATABASE: flow
MYSQL_ROOT_PASSWORD: root
ports:
- '3306:3306'
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
env:
APP_ENV: true
FLOW_CONTEXT: Testing/Functional
FLOW_DIST_FOLDER: flow-base-distribution
MYSQL_HOST: '127.0.0.1'
MYSQL_PORT: 3306
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.JobQueue.Scheduled
- name: Install netlogix/jobqueue-scheduled
run: composer require netlogix/jobqueue-scheduled:@dev
working-directory: ${{ env.FLOW_DIST_FOLDER }}
- name: "Copy Settings.yaml.dist"
run: cp DistributionPackages/Netlogix.JobQueue.Scheduled/Settings.yaml.dist Configuration/Testing/Settings.yaml
working-directory: ${{ env.FLOW_DIST_FOLDER }}
- name: Run tests
run: bin/phpunit -c DistributionPackages/Netlogix.JobQueue.Scheduled/phpunit.xml.dist --testsuite="Functional" --bootstrap "Build/BuildEssentials/PhpUnit/FunctionalTestBootstrap.php"
working-directory: ${{ env.FLOW_DIST_FOLDER }}