Namespace Redaxo\Core\RexVar #6445
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: Unit tests | |
on: | |
push: | |
branches: [temp] | |
pull_request: | |
types: [opened, synchronize, reopened, ready_for_review] | |
permissions: | |
contents: read | |
jobs: | |
phpunit: | |
runs-on: ${{ matrix.os || 'ubuntu-latest' }} | |
timeout-minutes: 30 | |
permissions: | |
contents: write # for Git to git apply | |
strategy: | |
matrix: | |
include: | |
- php-version: '8.3' | |
db-image: 'mysql:8.0' | |
composer-flags: '--prefer-lowest' | |
- php-version: '8.4' | |
db-image: 'mysql:8.3' | |
composer-flags: '--ignore-platform-req=php' | |
- php-version: '8.3' | |
db-image: 'mariadb:10.4' | |
- php-version: '8.3' | |
db-image: 'mariadb:latest' | |
# https://docs.github.com/en/free-pro-team@latest/actions/guides/about-service-containers | |
services: | |
mysql: | |
image: ${{ matrix.db-image }} | |
env: | |
MYSQL_ROOT_PASSWORD: root | |
ports: | |
- 3306:3306 | |
options: --health-cmd="${{ matrix.db-image == 'mariadb:latest' && 'mariadb-admin' || 'mysqladmin' }} ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
extensions: gd, intl, pdo_mysql | |
coverage: none # disable xdebug, pcov | |
- name: Composer install | |
uses: ramsey/composer-install@v3 | |
with: | |
composer-options: ${{ matrix.composer-flags }} | |
- name: Setup Problem Matchers for PHPUnit | |
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
- name: Setup REDAXO | |
run: | | |
mysql -uroot -h127.0.0.1 -proot -e 'create database redaxo6;' | |
php redaxo/bin/console setup:run -n --lang=de_de --db-host=127.0.0.1 --db-name=redaxo6 --db-password=root --db-createdb=no --db-setup=normal --admin-username=admin --admin-password=adminpassword --error-email=test@redaxo.invalid --ansi -v | |
php redaxo/bin/console config:set --type boolean debug.enabled true -v | |
php redaxo/bin/console config:set --type boolean debug.throw_always_exception true -v | |
redaxo/bin/console system:report -v | |
- name: Run phpunit | |
run: vendor/bin/phpunit --colors=always |