Add ImageMap, Collection Property Resolver and ResourceLoader #33
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: Test application | |
on: | |
pull_request: | |
push: | |
branches: | |
- '[0-9]+.x' | |
- '[0-9]+.[0-9]+' | |
# automatically cancel previously started workflows when pushing a new commit to a branch | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
js-css: | |
name: "Node ${{ matrix.node-version }}" | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- node-version: '18' | |
styleguide: false | |
npm-version: '8' | |
- node-version: '20' | |
npm-version: '10' | |
styleguide: true | |
env: | |
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Checkout project | |
uses: actions/checkout@v4 | |
- name: Install and configure Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install npm | |
if: ${{ matrix.npm-version }} | |
run: npm install --global npm@${{ matrix.npm-version }} | |
- name: Assert error when using yarn | |
run: tests/js/check-yarn-warning.sh | |
- name: Install npm dependencies | |
uses: bahmutov/npm-install@v1 | |
with: | |
useLockFile: false | |
- name: Output versions and installed dependencies | |
run: | | |
node --version | |
npm --version | |
npm list || true # ignore peer dependency errors | |
- name: Test JavaScript code | |
run: npm test -- --maxWorkers=4 | |
- name: Install and configure PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.2' | |
tools: 'composer:v2' | |
ini-values: memory_limit=-1 | |
coverage: none | |
- name: Install php dependencies | |
run: rm composer.json && composer require friendsofsymfony/jsrouting-bundle:^2.3 --no-interaction | |
- name: Test application build | |
run: npm run build | |
- name: Test Styleguidist build | |
if: ${{ matrix.styleguide }} | |
run: npm run styleguide:build | |
js-lint: | |
name: "Node Lint" | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
env: | |
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Checkout project | |
uses: actions/checkout@v4 | |
- name: Install and configure Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: Assert error when using yarn | |
run: tests/js/check-yarn-warning.sh | |
- name: Install npm dependencies | |
uses: bahmutov/npm-install@v1 | |
with: | |
useLockFile: false | |
- name: Lint JavaScript | |
run: npm run lint:js | |
- name: Lint SCSS | |
run: npm run lint:scss | |
- name: Flow | |
run: npm run flow -- check | |
- name: Depcruise | |
run: npm run depcruise | |
php: | |
name: "PHP ${{ matrix.php-version }} (${{ matrix.database }}, ${{ matrix.phpcr-transport }}, ${{ matrix.dependency-versions }})" | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
env: | |
APP_ENV: test | |
APP_SECRET: a448d1dfcaa563fce56c2fd9981f662b | |
MAILER_URL: null://localhost | |
SULU_ADMIN_EMAIL: | |
PHPCR_TRANSPORT: ${{ matrix.phpcr-transport }} | |
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- php-version: '8.2' | |
database: mysql-57 | |
phpcr-transport: doctrinedbal | |
dependency-versions: 'lowest' | |
php-extensions: 'ctype, iconv, mysql, gd' | |
tools: 'composer:v2' | |
env: | |
SYMFONY_DEPRECATIONS_HELPER: disabled | |
DATABASE_URL: mysql://[email protected]:3306/sulu_test?serverVersion=5.7 | |
DATABASE_CHARSET: utf8mb4 | |
DATABASE_COLLATE: utf8mb4_unicode_ci | |
- php-version: '8.2' | |
database: mysql-57 | |
phpcr-transport: jackrabbit | |
dependency-versions: 'highest' | |
php-extensions: 'ctype, iconv, mysql, imagick' | |
tools: 'composer:v2' | |
env: | |
SYMFONY_DEPRECATIONS_HELPER: weak | |
DATABASE_URL: mysql://[email protected]:3306/sulu_test?serverVersion=5.7 | |
DATABASE_CHARSET: utf8mb4 | |
DATABASE_COLLATE: utf8mb4_unicode_ci | |
- php-version: '8.3' | |
database: postgres-14 | |
phpcr-transport: doctrinedbal | |
dependency-versions: 'highest' | |
php-extensions: 'ctype, iconv, mysql, gd' | |
tools: 'composer:v2' | |
env: | |
SYMFONY_DEPRECATIONS_HELPER: weak | |
DATABASE_URL: postgres://symfony:[email protected]:5432/sulu_test?serverVersion=14.11 | |
DATABASE_CHARSET: UTF8 | |
DATABASE_COLLATE: | |
- php-version: '8.3' | |
database: mysql-80 | |
phpcr-transport: doctrinedbal | |
dependency-versions: 'highest' | |
php-extensions: 'ctype, iconv, mysql, imagick' | |
tools: 'composer:v2' | |
composer-stability: 'dev' | |
env: | |
SYMFONY_DEPRECATIONS_HELPER: weak | |
DATABASE_URL: mysql://root:[email protected]:3306/sulu_test?serverVersion=8.0 | |
DATABASE_CHARSET: utf8mb4 | |
DATABASE_COLLATE: utf8mb4_unicode_ci | |
steps: | |
- name: Checkout project | |
uses: actions/checkout@v4 | |
- name: Start Database | |
run: | | |
docker compose -f tests/docker/docker-compose.${{ matrix.database }}.yml up --wait | |
- name: Start Jackrabbit | |
if: ${{ matrix.phpcr-transport == 'jackrabbit' }} | |
run: | | |
docker compose -f tests/docker/docker-compose.jackrabbit.yml up --wait | |
- name: Install and configure PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
extensions: ${{ matrix.php-extensions }} | |
tools: ${{ matrix.tools }} | |
ini-values: memory_limit=-1 | |
coverage: none | |
- name: Remove Lint Tools | |
# These tools are not required to run tests, so we are removing them to improve dependency resolving and | |
# testing lowest versions. | |
run: composer remove "*php-cs-fixer*" "*phpstan*" "*rector*" --dev --no-update | |
- name: Require jackrabbit dependencies | |
if: ${{ matrix.phpcr-transport == 'jackrabbit' }} | |
run: | | |
composer remove jackalope/jackalope-doctrine-dbal --dev --no-interaction --no-update | |
composer require jackalope/jackalope-jackrabbit:"^1.4 || ^2.0" --no-interaction --no-update | |
- name: Install additional lowest dependencies | |
if: ${{ matrix.dependency-versions == 'lowest' }} | |
run: | | |
composer require symfony/swiftmailer-bundle --no-interaction --no-update | |
- name: Set composer stability | |
if: ${{ matrix.composer-stability }} | |
run: composer config minimum-stability ${{ matrix.composer-stability }} | |
- name: Install composer dependencies | |
uses: ramsey/composer-install@v1 | |
with: | |
dependency-versions: ${{matrix.dependency-versions}} | |
- name: Output versions and installed dependencies | |
run: | | |
echo 'PHP Version:' | |
php --version | |
echo '' | |
echo 'PHP Modules:' | |
php -m | |
echo '' | |
echo 'Composer Info:' | |
composer info | |
echo '' | |
echo 'Composer Lock:' | |
cat composer.lock | |
- name: Bootstrap test environment | |
run: composer bootstrap-test-environment | |
env: ${{ matrix.env }} | |
- name: Execute test cases | |
run: time composer test | |
env: ${{ matrix.env }} | |
php-lint: | |
name: "PHP Lint" | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
env: | |
APP_ENV: test | |
APP_SECRET: a448d1dfcaa563fce56c2fd9981f662b | |
MAILER_URL: null://localhost | |
SULU_ADMIN_EMAIL: | |
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- name: Checkout project | |
uses: actions/checkout@v4 | |
- name: Install and configure PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: '8.3' | |
extensions: 'ctype, iconv, mysql' | |
tools: 'composer:v2' | |
ini-values: memory_limit=-1 | |
coverage: none | |
- name: Install composer dependencies | |
uses: ramsey/composer-install@v1 | |
with: | |
dependency-versions: highest | |
- name: Output versions and installed dependencies | |
run: | | |
echo 'PHP Version:' | |
php --version | |
echo '' | |
echo 'PHP Modules:' | |
php -m | |
echo '' | |
echo 'Composer Info:' | |
composer info | |
echo '' | |
echo 'Composer Lock:' | |
cat composer.lock | |
- name: Lint code | |
run: composer lint |