fix: add missing type in normalize method of object brick adapter (#273) #59
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: "Codeception Tests with Elasticsearch" | |
on: | |
# Enable Later. | |
#schedule: | |
# - cron: '0 3 * * 1,3,5' | |
pull_request: | |
branches: | |
- "[0-9]+.[0-9]+" | |
- "[0-9]+.x" | |
- "feature-*" | |
push: | |
branches: | |
- "[0-9]+.[0-9]+" | |
- "[0-9]+.x" | |
env: | |
PIMCORE_PROJECT_ROOT: ${{ github.workspace }} | |
APP_ENV: test | |
PIMCORE_TEST: 1 | |
PIMCORE_TEST_DB_DSN: "mysql://[email protected]:33006/pimcore_test" | |
PIMCORE_ELASTIC_SEARCH_HOST: "localhost:5300" | |
CODECEPTION_BUNDLE_PATH: "bundles/pimcore/generic-data-index-bundle/" | |
jobs: | |
codeception-tests: | |
name: "Codeception tests" | |
runs-on: "ubuntu-20.04" | |
continue-on-error: ${{ matrix.experimental }} | |
strategy: | |
matrix: | |
include: | |
- { php-version: "8.3", dependencies: "highest", pimcore_version: "11.x-dev as 11.99.9", experimental: true, search_engine: "elasticsearch"} | |
services: | |
mariadb: | |
image: "mariadb:10.11" | |
ports: | |
- 33006:3306 | |
env: | |
MYSQL_ALLOW_EMPTY_PASSWORD: yes | |
elastic: | |
image: elasticsearch:8.5.3 | |
ports: | |
- 5300:9200 | |
env: | |
discovery.type: "single-node" | |
ES_JAVA_OPTS: "-Xms1g -Xmx1g" | |
xpack.security.enabled: "true" | |
xpack.security.authc.anonymous.roles: "superuser,kibana_admin,kibana_system,kibana_user" | |
ELASTIC_USERNAME: "elastic" | |
ELASTIC_PASSWORD: "somethingsecret" | |
steps: | |
- name: "Checkout code" | |
uses: "actions/checkout@v2" | |
with: | |
path: "bundles/pimcore/generic-data-index-bundle" | |
- name: "Copy .github directory" | |
env: | |
REQUIRE_ADMIN_BUNDLE: "${{ matrix.require_admin_bundle }}" | |
run: | | |
cp -R bundles/pimcore/generic-data-index-bundle/.github .github | |
- name: "Install PHP" | |
uses: "shivammathur/setup-php@v2" | |
with: | |
coverage: xdebug | |
ini-values: display_errors=On, display_startup_errors=On, error_reporting=32767 | |
php-version: "${{ matrix.php-version }}" | |
- name: Verify MariaDB connection | |
run: | | |
cp .github/ci/files/.my.cnf ~/.my.cnf | |
while ! mysqladmin ping --silent; do | |
sleep 1 | |
done | |
- name: "Setup Pimcore environment" | |
env: | |
REQUIRE_ADMIN_BUNDLE: "${{ matrix.require_admin_bundle }}" | |
run: | | |
mysql -e "CREATE DATABASE pimcore_test CHARSET=utf8mb4;" | |
cp -R bundles/pimcore/generic-data-index-bundle/tests tests | |
mkdir src | |
chmod 755 .github/ci/scripts/setup-pimcore-environment-functional-tests.sh | |
.github/ci/scripts/setup-pimcore-environment-functional-tests.sh "${{ matrix.search_engine }}" | |
- name: "Wait for Elasticsearch to be up" | |
run: | | |
if [ "${{ matrix.search_engine }}" == "elasticsearch" ]; then | |
echo "Waiting for Elasticsearch to be ready..." | |
until curl -s -u elastic:somethingsecret http://localhost:5300/_cluster/health | grep -q '"status":"green"'; do | |
echo "Waiting... Elasticsearch is not yet available." | |
sleep 5 | |
done | |
echo "Elasticsearch is up and running!" | |
else | |
echo "Using OpenSearch for testing, skipping Elasticsearch wait." | |
fi | |
- name: "Update Pimcore version" | |
env: | |
PIMCORE_VERSION: "${{ matrix.pimcore_version }}" | |
run: | | |
if [ ! -z "$PIMCORE_VERSION" ]; then | |
composer require --no-update pimcore/pimcore:"${PIMCORE_VERSION}" | |
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 --coverage-xml |