Skip to content

[TwigHooks] Remove translations on profiler #547

[TwigHooks] Remove translations on profiler

[TwigHooks] Remove translations on profiler #547

Workflow file for this run

name: Continuous Integration
on:
pull_request:
paths-ignore:
- "*.md"
workflow_dispatch: ~
workflow_call: ~
jobs:
static-checks:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [ "8.1", "8.2", "8.3" ]
postgres: ["14.6"]
symfony: [ "^6.4", "^7.0" ]
exclude:
- php: "8.1"
symfony: "^7.0"
name: "PHP ${{ matrix.php }} / Symfony ${{ matrix.symfony }}"
env:
APP_ENV: test
COMPOSER_ROOT_VERSION: "dev-main"
DATABASE_URL: "pgsql://postgres:[email protected]/sylius_stack?charset=utf8&serverVersion=${{ matrix.postgres }}"
steps:
- name: "Checkout"
uses: actions/checkout@v3
- name: "Setup PHP"
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
tools: symfony
coverage: none
- name: Shutdown default MySQL
run: sudo service mysql stop
- name: Setup PostgreSQL
uses: harmon758/postgresql-action@v1
with:
postgresql version: "${{ matrix.postgres }}"
postgresql password: "postgres"
- name: "Restrict packages' versions"
run: |
composer global config --no-plugins allow-plugins.symfony/flex true
composer global require --no-progress --no-scripts --no-plugins "symfony/flex"
composer config extra.symfony.require "${{ matrix.symfony }}"
- name: Get Composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: "Setup cache"
uses: actions/cache@v3
with:
path: |
${{ steps.composer-cache.outputs.dir }}
key: ${{ github.run_id }}-${{ runner.os }}-${{ hashFiles('composer.json') }}-symfony-${{ matrix.symfony }}
- name: "Install dependencies"
run: composer update --no-interaction --no-scripts
- name: "Validate composer.json"
run: composer validate --strict --no-check-version
- name: "Check for security vulnerabilities"
run: symfony security:check
- name: "Validate coding standard"
run: vendor/bin/ecs check
- name: "Validate Container"
run: bin/console lint:container
- name: Validate Package versions
run: vendor/bin/monorepo-builder validate
- name: Run PHPStan
run: vendor/bin/phpstan analyse
- name: Create Testing database
run: |
bin/console doctrine:database:create
bin/console doctrine:schema:create
- name: Run PHPUnit
run: vendor/bin/phpunit
- name: Run Translations Test Suite with PHPUnit
run: |
APP_LOCALE=fr vendor/bin/phpunit --testsuite="TranslationsTestSuite"
- name: "Restrict packages' versions (Admin Ui)"
run: |
(cd src/AdminUi/ && composer global config --no-plugins allow-plugins.symfony/flex true)
(cd src/AdminUi/ && composer global config --no-plugins allow-plugins.symfony/runtime true)
(cd src/AdminUi/ && composer global require --no-progress --no-scripts --no-plugins "symfony/flex")
(cd src/AdminUi/ && composer config extra.symfony.require "${{ matrix.symfony }}")
- name: "Install dependencies (Admin Ui)"
run: (cd src/AdminUi/ && composer update --no-interaction --no-scripts)
- name: Run PHPUnit (Admin Ui)
run: (cd src/AdminUi/ && vendor/bin/phpunit)
- name: "Restrict packages' versions (Bootstrap Admin Ui)"
run: |
(cd src/BootstrapAdminUi/ && composer global config --no-plugins allow-plugins.symfony/flex true)
(cd src/BootstrapAdminUi/ && composer global config --no-plugins allow-plugins.symfony/runtime true)
(cd src/BootstrapAdminUi/ && composer global require --no-progress --no-scripts --no-plugins "symfony/flex")
(cd src/BootstrapAdminUi/ && composer config extra.symfony.require "${{ matrix.symfony }}")
- name: "Install dependencies (Bootstrap Admin Ui)"
run: (cd src/BootstrapAdminUi/ && composer update --no-interaction --no-scripts)
- name: Run PHPUnit (Bootstrap Admin Ui)
run: (cd src/BootstrapAdminUi/ && vendor/bin/phpunit)
- name: "Restrict packages' versions (Twig Hooks)"
run: |
(cd src/TwigHooks/ && composer global config --no-plugins allow-plugins.symfony/flex true)
(cd src/TwigHooks/ && composer global config --no-plugins allow-plugins.symfony/runtime true)
(cd src/TwigHooks/ && composer global require --no-progress --no-scripts --no-plugins "symfony/flex")
(cd src/TwigHooks/ && composer config extra.symfony.require "${{ matrix.symfony }}")
- name: "Install dependencies (Twig Hooks)"
run: (cd src/TwigHooks/ && composer update --no-interaction --no-scripts)
- name: Run PHPUnit (Twig Hooks)
run: (cd src/TwigHooks/ && vendor/bin/phpunit)
- name: "Restrict packages' versions (Twig Extra)"
run: |
(cd src/TwigExtra/ && composer global config --no-plugins allow-plugins.symfony/flex true)
(cd src/TwigExtra/ && composer global config --no-plugins allow-plugins.symfony/runtime true)
(cd src/TwigExtra/ && composer global require --no-progress --no-scripts --no-plugins "symfony/flex")
(cd src/TwigExtra/ && composer config extra.symfony.require "${{ matrix.symfony }}")
- name: "Install dependencies (Twig Extra)"
run: (cd src/TwigExtra/ && composer update --no-interaction --no-scripts)
- name: Run PHPUnit (Twig Extra)
run: (cd src/TwigExtra/ && vendor/bin/phpunit)
- name: "Restrict packages' versions (Ui Translations)"
run: |
(cd src/UiTranslations/ && composer global config --no-plugins allow-plugins.symfony/flex true)
(cd src/UiTranslations/ && composer global config --no-plugins allow-plugins.symfony/runtime true)
(cd src/UiTranslations/ && composer global require --no-progress --no-scripts --no-plugins "symfony/flex")
(cd src/UiTranslations/ && composer config extra.symfony.require "${{ matrix.symfony }}")
- name: "Install dependencies (Ui Translations)"
run: (cd src/UiTranslations/ && composer update --no-interaction --no-scripts)
- name: Run PHPUnit (Ui Translations)
run: (cd src/UiTranslations/ && vendor/bin/phpunit)