Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ci/files/bin/console
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ if ($input->hasParameterOption('--no-debug', true)) {
putenv('APP_DEBUG='.$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = '0');
}

/** @var \Pimcore\Kernel $kernel */
/** @var \OpenDxp\Kernel $kernel */
$kernel = \OpenDxp\Bootstrap::startupCli();
$application = new \OpenDxp\Console\Application($kernel);
$application->run();
10 changes: 4 additions & 6 deletions .github/ci/files/config/packages/security.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
security:
enable_authenticator_manager: true

providers:
opendxp_admin:
id: OpenDxp\Security\User\UserProvider
Expand All @@ -10,17 +8,17 @@ security:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false

# Pimcore WebDAV HTTP basic // DO NOT CHANGE!
# OpenDxp WebDAV HTTP basic // DO NOT CHANGE!
opendxp_webdav:
pattern: ^/asset/webdav
provider: opendxp_admin
http_basic: ~

# Pimcore Admin Bundle firewall
# OpenDxp Admin Bundle firewall
opendxp_admin: '%opendxp_admin_bundle.firewall_settings%'

access_control:
# Pimcore admin ACl // DO NOT CHANGE!
# OpenDxp admin ACl // DO NOT CHANGE!
- { path: ^/admin/settings/display-custom-logo, roles: PUBLIC_ACCESS }
- { path: ^/admin/login/2fa-verify, roles: IS_AUTHENTICATED_2FA_IN_PROGRESS }
- { path: ^/admin/login/2fa-setup, roles: ROLE_OPENDXP_USER }
Expand All @@ -31,5 +29,5 @@ security:
- { path: ^/asset/webdav, roles: ROLE_OPENDXP_USER }

role_hierarchy:
# Pimcore admin // DO NOT CHANGE!
# OpenDxp admin // DO NOT CHANGE!
ROLE_OPENDXP_ADMIN: [ROLE_OPENDXP_USER]
2 changes: 1 addition & 1 deletion .github/ci/files/config/packages/test/config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
imports:
- { resource: ../../config.yaml }

# this cache is used during tests when setting up pimcore
# this cache is used during tests when setting up opendxp
framework:
cache:
pools:
Expand Down
2 changes: 1 addition & 1 deletion .github/ci/files/config/services.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ services:
# Example event listener for objects
# AppBundle\EventListener\TestListener:
# tags:
# - { name: kernel.event_listener, event: pimcore.dataobject.preUpdate, method: onObjectPreUpdate }
# - { name: kernel.event_listener, event: opendxp.dataobject.preUpdate, method: onObjectPreUpdate }

OpenDxp\Bundle\PersonalizationBundle\Installer:
public: true
Expand Down
1 change: 0 additions & 1 deletion .github/ci/files/config/system.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ opendxp:
path_variable: ''
domain: opendxp-test.dev
redirect_to_maindomain: false
language: en
valid_languages: 'en,de'
fallback_languages:
en: ''
Expand Down
2 changes: 1 addition & 1 deletion .github/ci/files/public/index_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
// request stack available yet
Tool::setCurrentRequest($request);

/** @var \Pimcore\Kernel $kernel */
/** @var \OpenDxp\Kernel $kernel */
$kernel = \OpenDxp\Bootstrap::kernel();

// reset current request - will be read from request stack from now on
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/cla.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: CLA check [centralised]

on:
issue_comment:
types: [ created ]
pull_request_target:
types: [ opened, closed, synchronize ]

jobs:
cla-workflow:
uses: open-dxp/workflows-collection-public/.github/workflows/reusable-cla-check.yaml@main
if: (github.event.comment.body == 'recheck' || github.event.comment.body == 'I have read the CLA Document and I hereby sign the CLA') || github.event_name == 'pull_request_target'
secrets:
CLA_ACTION_ACCESS_TOKEN: ${{ secrets.CLA_ACTION_ACCESS_TOKEN }}
14 changes: 0 additions & 14 deletions .github/workflows/cla.yml

This file was deleted.

135 changes: 68 additions & 67 deletions .github/workflows/codeception.yaml
Original file line number Diff line number Diff line change
@@ -1,85 +1,86 @@
name: "Codeception Tests"
name: Codeception Tests [centralised]

on:
schedule:
- cron: '0 3 * * 1,3,5'
pull_request:
branches:
- "[0-9]+.[0-9]+"
- "[0-9]+.x"
paths-ignore:
- 'doc/**'
- 'src/Resources/public/**'
workflow_dispatch:
push:
branches:
- "[0-9]+.[0-9]+"
- "[0-9]+.x"
paths-ignore:
- 'doc/**'
- 'src/Resources/public/**'
- "feature-*"
pull_request:
types: [ opened, synchronize, reopened ]

env:
OPENDXP_PROJECT_ROOT: ${{ github.workspace }}
APP_ENV: test
OPENDXP_TEST: 1
OPENDXP_TEST_DB_DSN: "mysql://root@127.0.0.1:33006/opendxp_test"

jobs:
codeception-tests:
name: "Codeception tests"
runs-on: "ubuntu-latest"
continue-on-error: ${{ matrix.experimental }}
env:
OPENDXP_TEST_DB_DSN: "mysql://root@127.0.0.1:33006/opendxp_test"
strategy:
matrix:
include:
- { php-version: 8.1, database: "mariadb:10.3", dependencies: lowest, experimental: false }
- { php-version: 8.2, database: "mariadb:10.11", dependencies: highest, experimental: false }
- { php-version: 8.3, database: "mariadb:10.11", opendxp_version: "11.5", dependencies: highest, experimental: true }
services:
mariadb:
image: "${{ matrix.database }}"
ports:
- 33006:3306
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes

setup-matrix:
runs-on: ubuntu-latest
outputs:
php_versions: ${{ steps.parse-php-versions.outputs.php_versions }}
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- name: "Checkout code"
uses: "actions/checkout@v2"
- name: Checkout code
uses: actions/checkout@v4

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
- name: Checkout reusable workflow repo
uses: actions/checkout@v4
with:
coverage: "none"
extensions: imagick
ini-values: display_errors=On, display_startup_errors=On, error_reporting=32767
php-version: "${{ matrix.php-version }}"
repository: open-dxp/workflows-collection-public
ref: main
path: reusable-workflows

- name: Verify MariaDB connection
- name: Parse PHP versions from composer.json
id: parse-php-versions
run: |
cp .github/ci/files/.my.cnf ~/.my.cnf
while ! mysqladmin ping --silent; do
sleep 1
done
- name: "Setup OpenDxp environment"
run: |
mysql -e "CREATE DATABASE opendxp_test CHARSET=utf8mb4;"
chmod 755 .github/ci/scripts/setup-opendxp-environment.sh
.github/ci/scripts/setup-opendxp-environment.sh
- name: "Update OpenDxp version"
env:
OPENDXP_VERSION: "${{ matrix.opendxp_version }}"
run: |
if [ ! -z "$OPENDXP_VERSION" ]; then
composer require --no-update open-dxp/opendxp:"${OPENDXP_VERSION}"
composer require --no-update open-dxp/admin-bundle:1.0
if [ -f composer.json ]; then
php_versions=$(jq -r '.require.php' composer.json | grep -oP '\d+\.\d+' | tr '\n' ',' | sed 's/,$//')
if [ -z "$php_versions" ]; then
echo "No PHP versions found in composer.json"
echo "Setting default PHP value"
echo "php_versions=default" >> $GITHUB_OUTPUT
else
echo "php_versions=$php_versions" >> $GITHUB_OUTPUT
echo "#### php versions #### : $php_versions"
fi
else
echo "composer.json not found"
exit 1
fi
- name: "Install dependencies with Composer"
uses: "ramsey/composer-install@v2"
with:
dependency-versions: "${{ matrix.dependencies }}"

- name: "Run Codeception"
run: "vendor/bin/codecept run -c . -vvv --xml"
- name: Set up matrix
id: set-matrix
run: |
php_versions="${{ steps.parse-php-versions.outputs.php_versions }}"

MATRIX_JSON=$(cat reusable-workflows/codeception-tests-configuration/matrix-config.json)

IFS=',' read -ra VERSIONS_ARRAY <<< "$php_versions"

FILTERED_MATRIX_JSON=$(echo $MATRIX_JSON | jq --arg php_versions "$php_versions" '
{
matrix: [
.configs[] |
select(.php_version == $php_versions) |
.matrix[]
]
}')

ENCODED_MATRIX_JSON=$(echo $FILTERED_MATRIX_JSON | jq -c .)

echo "matrix=${ENCODED_MATRIX_JSON}" >> $GITHUB_OUTPUT

codeception-tests:
needs: setup-matrix
strategy:
matrix: ${{ fromJson(needs.setup-matrix.outputs.matrix) }}
uses: open-dxp/workflows-collection-public/.github/workflows/reusable-codeception-tests-centralized.yaml@main
with:
APP_ENV: test
OPENDXP_TEST: 1
PHP_VERSION: ${{ matrix.matrix.php-version }}
DATABASE: ${{ matrix.matrix.database }}
SERVER_VERSION: ${{ matrix.matrix.server_version }}
DEPENDENCIES: ${{ matrix.matrix.dependencies }}
EXPERIMENTAL: ${{ matrix.matrix.experimental }}
OPENDXP_VERSION: ${{ matrix.matrix.opendxp_version }}
75 changes: 0 additions & 75 deletions .github/workflows/docs.yaml.bak

This file was deleted.

32 changes: 0 additions & 32 deletions .github/workflows/new-docs.yml

This file was deleted.

23 changes: 0 additions & 23 deletions .github/workflows/new-php-cs-fixer.yaml

This file was deleted.

Loading