Skip to content

Feat importexport bundle #1480

Feat importexport bundle

Feat importexport bundle #1480

Workflow file for this run

name: CI
on: [ push, pull_request ]
jobs:
lint:
name: Coding Standards
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@master
with:
php-version: 7.4
id: php
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest --no-interaction
- name: Check Sources
run: php vendor/bin/phpcs --standard=.cs/cs_ruleset.xml --extensions=php src/ components/ bin/
- name: Check Mess Sources
run: php vendor/bin/phpmd src,components,bin text .cs/md_ruleset.xml
ibexa:
name: Ibexa OSS ${{ matrix.ibexa_version }} on PHP${{ matrix.php }}
runs-on: ubuntu-latest
services:
mysql:
image: mariadb:10.4
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: ezplatform_test
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
redis:
image: redis:latest
ports:
- 6379:6379
options: --health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5
strategy:
matrix:
include:
- ibexa_version: 4.*
php: 8.1
node: 18.x
- ibexa_version: 4.5.*
php: 8.1
node: 14.x
- ibexa_version: 4.3.0
php: 7.4
node: 14.x
env:
CACHE_POOL: cache.redis
DATABASE_URL: mysql://[email protected]:3306/ezplatform_test
CACHE_DSN: 127.0.0.1:6379
APP_ENV: prod
APP_DEBUG: 1
COMPOSER_MEMORY_LIMIT: 4G
PANTHER_EXTERNAL_BASE_URI: http://127.0.0.1:8000
SYMFONY_DEPRECATIONS_HELPER: 999999
steps:
- uses: actions/checkout@v2
- uses: volta-cli/action@v4
with:
node-version: ${{ matrix.node }}
yarn-version: 1.x
- name: Check JS Version
run: |
node --version
yarn --version
/usr/local/bin/node --version
which node
yarn node --version
rm /usr/local/bin/node
ln -s `which node` /usr/local/bin/node
- name: Setup PHP
uses: shivammathur/setup-php@master
with:
php-version: ${{ matrix.php }}
extensions: mbstring, intl
id: php
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install Symfony Server
run: |
wget https://get.symfony.com/cli/installer -O - | bash
mv /home/runner/.symfony5/bin/symfony /usr/local/bin/symfony
symfony local:php:list
- name: Get Composer Cache Directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-cache-dir
restore-keys: |
${{ runner.os }}-composer-cache-dir
- name: Install dependencies of the Mono Repo
run: composer install --prefer-dist --no-progress --no-suggest --no-interaction
- name: Install Ibexa DXP and Yarn deps
run: |
composer create-project "ibexa/oss-skeleton:${{ matrix.ibexa_version }}" --prefer-dist --no-progress --no-interaction ibexa
mkdir -p ibexa/node_modules && ln -s ibexa/node_modules
cd ibexa
composer require --dev -W phpunit/phpunit:^9.5 --no-scripts
php bin/console ibexa:install
php bin/console ibexa:graphql:generate-schema
yarn add --dev algoliasearch react react-collapsible react-dom react-instantsearch-dom
- name: Run Webserver
run: |
cd ibexa
symfony local:server:start --no-tls -d
symfony local:server:list
- name: Install All the bundle on Top of a fresh eZ Installation
run: |
for COMPONENT in `ls components`; do
if COMPONENT=${COMPONENT} bin/ci-should install; then
echo ::group::..:: ${COMPONENT} ::..
COMPONENT_CONFIG_DIR="components/${COMPONENT}/tests/provisioning" COMPONENT=${COMPONENT} bin/wrapbundle
echo ::endgroup::
fi
done
cd ibexa
echo ::group::..:: Update Composer ::..
rm var/cache/prod -rf
composer update
bin/console d:s:u --force
echo ::endgroup::
echo ::group::..:: Do bundle specifics ::..
mysql -u root -h 127.0.0.1 -P 3306 ezplatform_test < ../components/SEOBundle/bundle/Resources/sql/schema.sql
mysql -u root -h 127.0.0.1 -P 3306 ezplatform_test < ../components/2FABundle/bundle/Resources/sql/schema.sql
echo ::endgroup::
echo ::group::..:: Final Steps ::..
php bin/console cache:clear
echo ::endgroup::
- name: Test Web Server
run: curl -I http://127.0.0.1:8000 | grep "HTTP/1.1 200 OK"
- name: Update PHP Unit
run: |
composer update && composer require -W phpunit/phpunit:^9.5 symfony/phpunit-bridge:^5.3
rm -f ibexa/config/packages/test/doctrine.yaml
php vendor/bin/bdi detect drivers
- name: Components testing
run: |
for COMPONENT in `ls components`; do
if COMPONENT=${COMPONENT} bin/ci-should test; then
echo ::group::..:: ${COMPONENT} ::..
DATABASE_URL=mysql://[email protected]:3306/ezplatform APP_ENV=test php ./vendor/bin/phpunit -c "components/${COMPONENT}/tests" "components/${COMPONENT}/tests" --exclude-group behat;
echo ::endgroup::
fi
done
- name: Dump logs
if: ${{ failure() }}
run: |
cd ibexa
ls -al var/log/
cat var/log/prod*
- name: Global Mono Repo Testing
run: |
DATABASE_URL=mysql://[email protected]:3306/ezplatform APP_ENV=test php ./vendor/bin/phpunit -c "tests" "tests" --exclude-group behat