Skip to content

feat: add redaxo/project skeleton #7898

feat: add redaxo/project skeleton

feat: add redaxo/project skeleton #7898

Workflow file for this run

name: Unit tests
on:
push:
branches: [temp]
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
env:
COMPOSER_ROOT_VERSION: 6.x-dev
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
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.5'
db-image: 'mysql:8.0'
composer-flags: '--prefer-lowest'
- php-version: '8.5'
db-image: 'mysql:8.4'
- php-version: '8.6'
db-image: 'mysql:latest'
composer-flags: '--ignore-platform-req=php'
- php-version: '8.5'
db-image: 'mariadb:10.4'
- php-version: '8.5'
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
${{ matrix.db-image == 'mysql:8.4' && '-e MYSQL_ROOT_PASSWORD=root --entrypoint sh mysql:8.4 -c "exec docker-entrypoint.sh mysqld --mysql-native-password=ON"' || '' }}
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup PHP
uses: shivammathur/setup-php@7c071dfe9dc99bdf297fa79cb49ea005b9fcadbc # 2.37.1
with:
php-version: ${{ matrix.php-version }}
extensions: gd, intl, pdo_mysql
coverage: none # disable xdebug, pcov
- name: Composer install
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
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 project/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 project/bin/console config:set --type boolean debug.enabled true -v
php project/bin/console config:set --type boolean debug.throw_always_exception true -v
project/bin/console addon:install test -v
project/bin/console system:report -v
- name: Run phpunit
run: vendor/bin/phpunit --colors=always