diff --git a/.github/workflows/backend-ci.yaml b/.github/workflows/backend-ci.yaml new file mode 100644 index 0000000..baf8c1f --- /dev/null +++ b/.github/workflows/backend-ci.yaml @@ -0,0 +1,33 @@ +name: Backend CI + +on: + push: + branches: + - '[0-9]+.[0-9]+' + pull_request: ~ + workflow_dispatch: ~ + +jobs: + cs-fix: + name: Run code style check + runs-on: "ubuntu-26.04" + strategy: + matrix: + php: + - '7.4' + steps: + - uses: actions/checkout@v7 + + - 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 + shell: bash + run: | + set -euo pipefail + composer run-script check-cs -- --format=checkstyle | cs2pr diff --git a/.github/workflows/pr-assign.yaml b/.github/workflows/pr-assign.yaml deleted file mode 100644 index 302423e..0000000 --- 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 }} diff --git a/composer.json b/composer.json index 455807f..3bce331 100644 --- a/composer.json +++ b/composer.json @@ -35,10 +35,10 @@ "require-dev": { "ibexa/code-style": "^1.0", "ibexa/doctrine-schema": "~4.6.0@dev", - "friendsofphp/php-cs-fixer": "^3.0", - "phpunit/phpunit": "^6.4 || ^7.0" + "friendsofphp/php-cs-fixer": "^3.0" }, "scripts": { + "check-cs": "@fix-cs --dry-run", "fix-cs": "php-cs-fixer fix --config=.php-cs-fixer.php -v --show-progress=dots" }, "extra": { diff --git a/src/bundle/DependencyInjection/Compiler/CronJobCompilerPass.php b/src/bundle/DependencyInjection/Compiler/CronJobCompilerPass.php index 9c5c447..d0af13e 100644 --- a/src/bundle/DependencyInjection/Compiler/CronJobCompilerPass.php +++ b/src/bundle/DependencyInjection/Compiler/CronJobCompilerPass.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Cron\DependencyInjection\Compiler; use Ibexa\Bundle\Cron\Registry\CronJobsRegistry; diff --git a/src/bundle/DependencyInjection/IbexaCronExtension.php b/src/bundle/DependencyInjection/IbexaCronExtension.php index 06db718..f6f0e5f 100644 --- a/src/bundle/DependencyInjection/IbexaCronExtension.php +++ b/src/bundle/DependencyInjection/IbexaCronExtension.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Cron\DependencyInjection; use Symfony\Component\Config\FileLocator; diff --git a/src/bundle/IbexaCronBundle.php b/src/bundle/IbexaCronBundle.php index 839d4a0..b993ae7 100644 --- a/src/bundle/IbexaCronBundle.php +++ b/src/bundle/IbexaCronBundle.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Cron; use Ibexa\Bundle\Cron\DependencyInjection\Compiler\CronJobCompilerPass; diff --git a/src/bundle/Registry/CronJobsRegistry.php b/src/bundle/Registry/CronJobsRegistry.php index a40cd95..6c8db44 100644 --- a/src/bundle/Registry/CronJobsRegistry.php +++ b/src/bundle/Registry/CronJobsRegistry.php @@ -4,6 +4,7 @@ * @copyright Copyright (C) Ibexa AS. All rights reserved. * @license For full copyright and license information view LICENSE file distributed with this source code. */ + namespace Ibexa\Bundle\Cron\Registry; use Cron\Job\ShellJob;