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
47 changes: 12 additions & 35 deletions .github/workflows/backend-ci.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: CI
name: Backend CI

on:
push:
branches:
- main
- '[0-9]+.[0-9]+'
pull_request: ~
workflow_dispatch:
Expand All @@ -29,43 +28,17 @@ 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 }}
satis-network-token: ${{ secrets.SATIS_NETWORK_TOKEN }}

- name: Run code style check
run: composer run-script check-cs -- --format=checkstyle | cs2pr

rector:
name: Run rector
runs-on: "ubuntu-26.04"
strategy:
matrix:
php:
- '8.4'
steps:
- uses: actions/checkout@v7

- 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@v7

- 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
shell: bash
run: |
set -euo pipefail
composer run-script check-cs -- --format=checkstyle | cs2pr

deptrac:
name: Deptrac
Expand All @@ -80,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 }}
Expand All @@ -106,6 +80,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 }}
Expand Down Expand Up @@ -154,6 +129,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 }}
Expand Down Expand Up @@ -206,6 +182,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 }}
Expand All @@ -226,7 +203,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-26.04
runs-on: "ubuntu-26.04"
steps:
- name: Determine overall result
id: result
Expand All @@ -250,7 +227,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
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/browser-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: Browser tests
on:
push:
branches:
- main
- '[0-9]+.[0-9]+'
pull_request: ~

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/frontend-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ on:
- "**.tsx"
- "**.scss"
branches:
- main
- '[0-9]+.[0-9]+'
pull_request:
paths:
Expand All @@ -31,12 +30,13 @@ jobs:

steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
- uses: actions/setup-node@v7
with:
node-version: '24'
- 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 }}
Expand Down
10 changes: 0 additions & 10 deletions .github/workflows/pr-assign.yaml

This file was deleted.

17 changes: 17 additions & 0 deletions .github/workflows/rector.yaml
Original file line number Diff line number Diff line change
@@ -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 }}
4 changes: 4 additions & 0 deletions tests/integration/AdminUiIbexaTestKernel.php
Original file line number Diff line number Diff line change
Expand Up @@ -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\Translations\IbexaTranslationsBundle;
use Ibexa\Bundle\TwigComponents\IbexaTwigComponentsBundle;
Expand All @@ -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();
Expand Down
47 changes: 8 additions & 39 deletions tests/integration/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
],
]);