From 16f84a0cef545c077d0a2f70baa50dd45adf93f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Niedzielski?= Date: Thu, 10 Sep 2026 14:18:39 +0200 Subject: [PATCH 1/4] IBX-12358: Bootstrapped integration tests through Bootstrapper (#2082) --- composer.json | 4 +- tests/integration/AdminUiIbexaTestKernel.php | 4 ++ tests/integration/bootstrap.php | 47 ++++---------------- 3 files changed, 14 insertions(+), 41 deletions(-) diff --git a/composer.json b/composer.json index 320e51ca25..ce1b38c5d0 100644 --- a/composer.json +++ b/composer.json @@ -77,8 +77,8 @@ "ibexa/code-style": "^1.3.x-dev", "ibexa/notifications": "~4.6.0@dev", "ibexa/phpstan": "~4.6.x-dev", - "ibexa/test-rest": "^0.1.x-dev", - "ibexa/test-core": "^0.1.x-dev", + "ibexa/test-rest": "~4.6.x-dev", + "ibexa/test-core": "~4.6.x-dev", "phpstan/phpstan": "^2.0", "phpstan/phpstan-phpunit": "^2.0", "phpstan/phpstan-symfony": "^2.0" diff --git a/tests/integration/AdminUiIbexaTestKernel.php b/tests/integration/AdminUiIbexaTestKernel.php index 6b4c8afa37..2a32e2a3ea 100644 --- a/tests/integration/AdminUiIbexaTestKernel.php +++ b/tests/integration/AdminUiIbexaTestKernel.php @@ -17,6 +17,7 @@ use Ibexa\Bundle\Notifications\IbexaNotificationsBundle; use Ibexa\Bundle\Rest\IbexaRestBundle; use Ibexa\Bundle\Search\IbexaSearchBundle; +use Ibexa\Bundle\Test\Core\IbexaTestCoreBundle; use Ibexa\Bundle\Test\Rest\IbexaTestRestBundle; use Ibexa\Bundle\TwigComponents\IbexaTwigComponentsBundle; use Ibexa\Bundle\User\IbexaUserBundle; @@ -43,6 +44,9 @@ public function registerBundles(): iterable { yield from parent::registerBundles(); + // required by Bootstrapper: provides HooksExecutorInterface and the built-in hooks + yield new IbexaTestCoreBundle(); + yield new HautelookTemplatedUriBundle(); yield new KnpMenuBundle(); yield new WebpackEncoreBundle(); diff --git a/tests/integration/bootstrap.php b/tests/integration/bootstrap.php index fa6083c9d0..48b6f8c444 100644 --- a/tests/integration/bootstrap.php +++ b/tests/integration/bootstrap.php @@ -6,48 +6,17 @@ */ declare(strict_types=1); -use Ibexa\Contracts\Core\Test\Persistence\Fixture\FixtureImporter; -use Ibexa\Tests\Core\Repository\LegacySchemaImporter; -use Ibexa\Tests\Integration\AdminUi\AdminUiIbexaTestKernel; -use Symfony\Bundle\FrameworkBundle\Console\Application; -use Symfony\Component\Console\Input\ArrayInput; +use Ibexa\Contracts\Test\Core\Bootstrapper\Bootstrapper; $packageRoot = dirname(__DIR__, 2); require_once $packageRoot . '/vendor/autoload.php'; chdir($packageRoot); -$kernel = new AdminUiIbexaTestKernel('test', true); -$kernel->boot(); - -$application = new Application($kernel); -$application->setAutoExit(false); - -$databaseUrl = getenv('DATABASE_URL'); -if ($databaseUrl !== false && 'sqlite' !== substr($databaseUrl, 0, 6)) { - $application->run(new ArrayInput([ - 'command' => 'doctrine:database:drop', - '--if-exists' => '1', - '--force' => '1', - '--quiet' => true, - ])); -} - -$application->run(new ArrayInput([ - 'command' => 'doctrine:database:create', - '--quiet' => true, -])); - -/** @var \Psr\Container\ContainerInterface $testContainer */ -$testContainer = $kernel->getContainer()->get('test.service_container'); - -$schemaImporter = $testContainer->get(LegacySchemaImporter::class); -foreach ($kernel->getSchemaFiles() as $file) { - $schemaImporter->importSchema($file); -} - -$fixtureImporter = $testContainer->get(FixtureImporter::class); -foreach ($kernel->getFixtures() as $fixture) { - $fixtureImporter->import($fixture); -} -$kernel->shutdown(); +(new Bootstrapper())->bootstrap(null, [ + Bootstrapper::class => [ + // this package's tests never ran doctrine:schema:update, and Bootstrapper enables it by + // default; keep it off so the bootstrap stays equivalent + Bootstrapper::OPTION_SCHEMA_UPDATE => false, + ], +]); From 5c5a1012a7511be8fae778f61f55ad41de11f11f Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 11 Sep 2026 22:13:45 +0200 Subject: [PATCH 2/4] IBX-11778: Updated GitHub Actions workflows to org standard (#2063) For more details see https://ibexa.atlassian.net/browse/IBX-11778 and https://github.com/ibexa/admin-ui/pull/2063 Key changes: * Renamed the CI workflow to `Backend CI` and kept its `workflow_dispatch` inputs and notify-slack job * Updated third-party GitHub Actions (`actions/checkout`, `actions/setup-node`, `slackapi/slack-github-action` to v4.0.0) and standardized runners to `ubuntu-26.04` * Passed the PHP version explicitly to the shared `composer-install` action * Dropped non-existent `main`/`master` branches from push triggers in `backend-ci`, `frontend-ci` and `browser-tests` workflows * Removed the deprecated `pr-assign.yaml` workflow * Guarded the code style check step with `set -euo pipefail` so `check-cs` failures are no longer masked by `cs2pr` --------- Co-Authored-By: Claude Fable 5.1 --- .github/workflows/backend-ci.yaml | 32 +++++++++++++++++----------- .github/workflows/browser-tests.yaml | 1 - .github/workflows/frontend-ci.yaml | 7 +++--- .github/workflows/pr-assign.yaml | 10 --------- 4 files changed, 22 insertions(+), 28 deletions(-) delete mode 100644 .github/workflows/pr-assign.yaml diff --git a/.github/workflows/backend-ci.yaml b/.github/workflows/backend-ci.yaml index b0e4039886..7f2daca7be 100644 --- a/.github/workflows/backend-ci.yaml +++ b/.github/workflows/backend-ci.yaml @@ -1,9 +1,8 @@ -name: CI +name: Backend CI on: push: branches: - - main - '[0-9]+.[0-9]+' pull_request: ~ workflow_dispatch: @@ -17,29 +16,33 @@ on: jobs: cs-fix: name: Run code style check - runs-on: "ubuntu-24.04" + runs-on: "ubuntu-26.04" strategy: matrix: php: - '8.0' steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: ibexa/gh-workflows/actions/setup-composer-root-version@main - uses: ibexa/gh-workflows/actions/composer-install@main with: + php-version: ${{ matrix.php }} gh-client-id: ${{ secrets.AUTOMATION_CLIENT_ID }} gh-client-secret: ${{ secrets.AUTOMATION_CLIENT_SECRET }} satis-network-key: ${{ secrets.SATIS_NETWORK_KEY }} satis-network-token: ${{ secrets.SATIS_NETWORK_TOKEN }} - name: Run code style check - run: composer run-script check-cs -- --format=checkstyle | cs2pr + shell: bash + run: | + set -euo pipefail + composer run-script check-cs -- --format=checkstyle | cs2pr tests: name: Tests - runs-on: "ubuntu-24.04" + runs-on: "ubuntu-26.04" timeout-minutes: 10 strategy: @@ -51,12 +54,13 @@ jobs: - '8.4' steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: ibexa/gh-workflows/actions/setup-composer-root-version@main - uses: ibexa/gh-workflows/actions/composer-install@main with: + php-version: ${{ matrix.php }} gh-client-id: ${{ secrets.AUTOMATION_CLIENT_ID }} gh-client-secret: ${{ secrets.AUTOMATION_CLIENT_SECRET }} satis-network-key: ${{ secrets.SATIS_NETWORK_KEY }} @@ -88,7 +92,7 @@ jobs: --health-timeout 5s --health-retries 5 --tmpfs /var/lib/postgresql/data - runs-on: "ubuntu-24.04" + runs-on: "ubuntu-26.04" timeout-minutes: 20 strategy: @@ -99,12 +103,13 @@ jobs: - '8.4' steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: ibexa/gh-workflows/actions/setup-composer-root-version@main - uses: ibexa/gh-workflows/actions/composer-install@main with: + php-version: ${{ matrix.php }} gh-client-id: ${{ secrets.AUTOMATION_CLIENT_ID }} gh-client-secret: ${{ secrets.AUTOMATION_CLIENT_SECRET }} satis-network-key: ${{ secrets.SATIS_NETWORK_KEY }} @@ -139,7 +144,7 @@ jobs: --health-timeout=5s --health-retries=5 --tmpfs=/var/lib/mysql - runs-on: "ubuntu-24.04" + runs-on: "ubuntu-26.04" timeout-minutes: 20 strategy: @@ -151,12 +156,13 @@ jobs: - '8.4' steps: - - uses: actions/checkout@v6 + - uses: actions/checkout@v7 - uses: ibexa/gh-workflows/actions/setup-composer-root-version@main - uses: ibexa/gh-workflows/actions/composer-install@main with: + php-version: ${{ matrix.php }} gh-client-id: ${{ secrets.AUTOMATION_CLIENT_ID }} gh-client-secret: ${{ secrets.AUTOMATION_CLIENT_SECRET }} satis-network-key: ${{ secrets.SATIS_NETWORK_KEY }} @@ -175,7 +181,7 @@ jobs: name: Notify Slack needs: [cs-fix, tests, integration-tests-postgres, integration-tests-mysql] if: always() && github.event_name == 'workflow_dispatch' - runs-on: ubuntu-latest + runs-on: "ubuntu-26.04" steps: - name: Determine overall result id: result @@ -199,7 +205,7 @@ jobs: - name: Send Slack notification if: steps.result.outputs.state == 'failure' || inputs.send-success-notification - uses: slackapi/slack-github-action@45a88b9581bfab2566dc881e2cd66d334e621e2c # v3.0.3 + uses: slackapi/slack-github-action@dcb1066f776dd043e64d0e8ba94ca15cc7e1875d # v4.0.0 with: webhook: ${{ secrets.SLACK_PHP_BACKEND_CI_WEBHOOK_URL }} webhook-type: incoming-webhook diff --git a/.github/workflows/browser-tests.yaml b/.github/workflows/browser-tests.yaml index 8103284d94..8f1b4263ec 100644 --- a/.github/workflows/browser-tests.yaml +++ b/.github/workflows/browser-tests.yaml @@ -3,7 +3,6 @@ name: Browser tests on: push: branches: - - main - '[0-9]+.[0-9]+' pull_request: ~ diff --git a/.github/workflows/frontend-ci.yaml b/.github/workflows/frontend-ci.yaml index 109f8f8028..be3a66f23f 100644 --- a/.github/workflows/frontend-ci.yaml +++ b/.github/workflows/frontend-ci.yaml @@ -3,19 +3,18 @@ name: Frontend build on: push: branches: - - main - '[0-9]+.[0-9]+' pull_request: ~ jobs: frontend-test: name: Frontend build test - runs-on: 'ubuntu-24.04' + runs-on: 'ubuntu-26.04' timeout-minutes: 5 steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v2 + - uses: actions/checkout@v7 + - uses: actions/setup-node@v7 with: node-version: '18' - run: yarn install diff --git a/.github/workflows/pr-assign.yaml b/.github/workflows/pr-assign.yaml deleted file mode 100644 index 302423e306..0000000000 --- a/.github/workflows/pr-assign.yaml +++ /dev/null @@ -1,10 +0,0 @@ -name: Assign Pull Request to maintainers - -on: - pull_request_target: - -jobs: - assign: - uses: ibexa/gh-workflows/.github/workflows/pr-assign.yml@main - secrets: - robot-token: ${{ secrets.EZROBOT_PAT }} From 841e83c691a2dcbff1059667dba6c6fcf686dc98 Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Fri, 11 Sep 2026 22:27:31 +0200 Subject: [PATCH 3/4] [GHA][Rector PHP] Reused shared Rector workflow Replaced the inline rector job in backend-ci.yaml with a dedicated rector.yaml calling ibexa/gh-workflows' reusable Rector workflow, matching the org standard and ibexa/core. The inline job was also broken: it ran setup-php with the matrix PHP version, then did a second checkout that reset the workspace, and never passed php-version to composer-install. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/backend-ci.yaml | 30 ------------------------------ .github/workflows/rector.yaml | 17 +++++++++++++++++ 2 files changed, 17 insertions(+), 30 deletions(-) create mode 100644 .github/workflows/rector.yaml diff --git a/.github/workflows/backend-ci.yaml b/.github/workflows/backend-ci.yaml index ec219ab297..5f3a43c7a3 100644 --- a/.github/workflows/backend-ci.yaml +++ b/.github/workflows/backend-ci.yaml @@ -40,36 +40,6 @@ jobs: set -euo pipefail composer run-script check-cs -- --format=checkstyle | cs2pr - rector: - name: Run rector - runs-on: "ubuntu-22.04" - strategy: - matrix: - php: - - '8.3' - steps: - - uses: actions/checkout@v4 - - - name: Setup PHP Action - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - coverage: none - extensions: 'pdo_sqlite, gd' - tools: cs2pr - - - uses: actions/checkout@v6 - - - uses: ibexa/gh-workflows/actions/composer-install@main - with: - gh-client-id: ${{ secrets.AUTOMATION_CLIENT_ID }} - gh-client-secret: ${{ secrets.AUTOMATION_CLIENT_SECRET }} - satis-network-key: ${{ secrets.SATIS_NETWORK_KEY }} - satis-network-token: ${{ secrets.SATIS_NETWORK_TOKEN }} - - - name: Run rector - run: vendor/bin/rector process --dry-run --ansi - tests: name: Tests runs-on: "ubuntu-26.04" diff --git a/.github/workflows/rector.yaml b/.github/workflows/rector.yaml new file mode 100644 index 0000000000..804802aedf --- /dev/null +++ b/.github/workflows/rector.yaml @@ -0,0 +1,17 @@ +name: Rector PHP +on: + push: + branches: + - '[0-9]+.[0-9]+' + pull_request: ~ +jobs: + rector: + name: Run rector + uses: ibexa/gh-workflows/.github/workflows/rector.yml@main + with: + php-version: '8.3' + secrets: + AUTOMATION_CLIENT_ID: ${{ secrets.AUTOMATION_CLIENT_ID }} + AUTOMATION_CLIENT_SECRET: ${{ secrets.AUTOMATION_CLIENT_SECRET }} + SATIS_NETWORK_KEY: ${{ secrets.SATIS_NETWORK_KEY }} + SATIS_NETWORK_TOKEN: ${{ secrets.SATIS_NETWORK_TOKEN }} From f39c5bc2d7ed5edb72b3db1456882ad8a8efef6d Mon Sep 17 00:00:00 2001 From: Andrew Longosz Date: Sun, 13 Sep 2026 15:29:59 +0200 Subject: [PATCH 4/4] IBX-11778: [GHA] Added explicit php-version to composer-install steps The Deptrac and Frontend build jobs are 6.0-only, so the 4.6 workflow sweep never reached them and both called composer-install without a php-version. Deptrac has a `php` matrix, so its fallback already resolved to 8.4 and this only makes it explicit. The Frontend build job has no matrix at all, so setup-php was installing its default latest stable PHP - pinned to 8.4 to match the rest of the branch. Co-Authored-By: Claude Opus 5 (1M context) --- .github/workflows/backend-ci.yaml | 1 + .github/workflows/frontend-ci.yaml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/backend-ci.yaml b/.github/workflows/backend-ci.yaml index b19803d084..ad96f1ded5 100644 --- a/.github/workflows/backend-ci.yaml +++ b/.github/workflows/backend-ci.yaml @@ -53,6 +53,7 @@ jobs: - uses: ibexa/gh-workflows/actions/composer-install@main with: + php-version: ${{ matrix.php }} gh-client-id: ${{ secrets.AUTOMATION_CLIENT_ID }} gh-client-secret: ${{ secrets.AUTOMATION_CLIENT_SECRET }} satis-network-key: ${{ secrets.SATIS_NETWORK_KEY }} diff --git a/.github/workflows/frontend-ci.yaml b/.github/workflows/frontend-ci.yaml index 0091a47858..f1b02fdcb8 100644 --- a/.github/workflows/frontend-ci.yaml +++ b/.github/workflows/frontend-ci.yaml @@ -36,6 +36,7 @@ jobs: - uses: ibexa/gh-workflows/actions/setup-composer-root-version@main - uses: ibexa/gh-workflows/actions/composer-install@main with: + php-version: '8.4' gh-client-id: ${{ secrets.AUTOMATION_CLIENT_ID }} gh-client-secret: ${{ secrets.AUTOMATION_CLIENT_SECRET }} satis-network-key: ${{ secrets.SATIS_NETWORK_KEY }}