-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2485d26
commit ba93b2c
Showing
6 changed files
with
151 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,90 @@ | ||
name: Backend build | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- '[0-9]+.[0-9]+' | ||
pull_request: ~ | ||
|
||
jobs: | ||
cs-fix: | ||
name: Run code style check | ||
runs-on: "ubuntu-22.04" | ||
strategy: | ||
matrix: | ||
php: | ||
- '8.1' | ||
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 | ||
|
||
- name: Add composer keys for private packagist | ||
run: | | ||
composer config http-basic.updates.ibexa.co $SATIS_NETWORK_KEY $SATIS_NETWORK_TOKEN | ||
composer config github-oauth.github.com $TRAVIS_GITHUB_TOKEN | ||
env: | ||
SATIS_NETWORK_KEY: ${{ secrets.SATIS_NETWORK_KEY }} | ||
SATIS_NETWORK_TOKEN: ${{ secrets.SATIS_NETWORK_TOKEN }} | ||
TRAVIS_GITHUB_TOKEN: ${{ secrets.TRAVIS_GITHUB_TOKEN }} | ||
|
||
- uses: ramsey/composer-install@v3 | ||
with: | ||
dependency-versions: "highest" | ||
|
||
- name: Run code style check | ||
run: composer run-script check-cs -- --format=checkstyle | cs2pr | ||
|
||
tests: | ||
name: Tests | ||
runs-on: "ubuntu-22.04" | ||
timeout-minutes: 10 | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: | ||
- '7.4' | ||
- '8.2' | ||
- '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 | ||
|
||
- name: Add composer keys for private packagist | ||
run: | | ||
composer config http-basic.updates.ibexa.co $SATIS_NETWORK_KEY $SATIS_NETWORK_TOKEN | ||
composer config github-oauth.github.com $TRAVIS_GITHUB_TOKEN | ||
env: | ||
SATIS_NETWORK_KEY: ${{ secrets.SATIS_NETWORK_KEY }} | ||
SATIS_NETWORK_TOKEN: ${{ secrets.SATIS_NETWORK_TOKEN }} | ||
TRAVIS_GITHUB_TOKEN: ${{ secrets.TRAVIS_GITHUB_TOKEN }} | ||
|
||
- uses: ramsey/composer-install@v3 | ||
with: | ||
dependency-versions: "highest" | ||
composer-options: "--prefer-dist --no-progress --no-suggest" | ||
|
||
- name: Setup problem matchers for PHPUnit | ||
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | ||
|
||
- name: Run PHPStan analysis | ||
run: composer run-script phpstan | ||
|
||
- name: Run test suite | ||
run: composer run-script --timeout=600 test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,62 @@ | ||
parameters: | ||
ignoreErrors: | ||
- | ||
message: "#^Parameter \\#2 \\$callback of function array_filter expects \\(callable\\(mixed\\)\\: bool\\)\\|null, Closure\\(mixed\\)\\: \\(array\\|null\\) given\\.$#" | ||
count: 1 | ||
path: src/bundle/DependencyInjection/IbexaAutomatedTranslationExtension.php | ||
|
||
- | ||
message: "#^Access to protected property Ibexa\\\\AdminUi\\\\Form\\\\Data\\\\ContentTranslationData\\:\\:\\$content\\.$#" | ||
count: 4 | ||
path: src/bundle/Form/Extension/ContentEditType.php | ||
|
||
- | ||
message: "#^Call to method getBlockDefinition\\(\\) on an unknown class Ibexa\\\\FieldTypePage\\\\FieldType\\\\Page\\\\Block\\\\Definition\\\\BlockDefinitionFactory\\.$#" | ||
message: "#^Parameter \\#3 \\$remoteServiceKey of method Ibexa\\\\AutomatedTranslation\\\\Translator\\:\\:getTranslatedFields\\(\\) expects string, string\\|null given\\.$#" | ||
count: 1 | ||
path: src/lib/Encoder/Field/PageBuilderFieldEncoder.php | ||
path: src/bundle/Form/Extension/ContentEditType.php | ||
|
||
- | ||
message: "#^Call to method getPage\\(\\) on an unknown class Ibexa\\\\FieldTypePage\\\\FieldType\\\\LandingPage\\\\Value\\.$#" | ||
count: 2 | ||
message: "#^Cannot call method setValue\\(\\) on Ibexa\\\\Contracts\\\\FieldTypePage\\\\FieldType\\\\LandingPage\\\\Model\\\\Attribute\\|null\\.$#" | ||
count: 1 | ||
path: src/lib/Encoder/Field/PageBuilderFieldEncoder.php | ||
|
||
- | ||
message: "#^Instantiated class Ibexa\\\\FieldTypePage\\\\FieldType\\\\LandingPage\\\\Value not found\\.$#" | ||
count: 2 | ||
path: src/lib/Encoder/Field/PageBuilderFieldEncoder.php | ||
message: "#^Call to an undefined method Ibexa\\\\AutomatedTranslation\\\\Encoder\\\\BlockAttribute\\\\BlockAttributeEncoderManager\\:\\:expects\\(\\)\\.$#" | ||
count: 1 | ||
path: tests/lib/Encoder/Field/PageBuilderFieldEncoderTest.php | ||
|
||
- | ||
message: "#^Method Ibexa\\\\AutomatedTranslation\\\\Encoder\\\\Field\\\\PageBuilderFieldEncoder\\:\\:decode\\(\\) should return Ibexa\\\\Core\\\\FieldType\\\\Value but returns Ibexa\\\\FieldTypePage\\\\FieldType\\\\LandingPage\\\\Value\\.$#" | ||
count: 2 | ||
path: src/lib/Encoder/Field/PageBuilderFieldEncoder.php | ||
message: "#^Call to an undefined method Ibexa\\\\AutomatedTranslation\\\\Encoder\\\\BlockAttribute\\\\BlockAttributeEncoderManager\\:\\:method\\(\\)\\.$#" | ||
count: 1 | ||
path: tests/lib/Encoder/Field/PageBuilderFieldEncoderTest.php | ||
|
||
- | ||
message: "#^PHPDoc tag @var for variable \\$previousFieldValue contains unknown class Ibexa\\\\FieldTypePage\\\\FieldType\\\\LandingPage\\\\Value\\.$#" | ||
message: "#^Call to an undefined method Ibexa\\\\FieldTypePage\\\\FieldType\\\\Page\\\\Block\\\\Definition\\\\BlockDefinitionFactoryInterface\\:\\:method\\(\\)\\.$#" | ||
count: 1 | ||
path: src/lib/Encoder/Field/PageBuilderFieldEncoder.php | ||
path: tests/lib/Encoder/Field/PageBuilderFieldEncoderTest.php | ||
|
||
- | ||
message: "#^PHPDoc tag @var for variable \\$value contains unknown class Ibexa\\\\FieldTypePage\\\\FieldType\\\\LandingPage\\\\Value\\.$#" | ||
message: "#^Parameter \\#1 \\$type of method Ibexa\\\\AutomatedTranslation\\\\Encoder\\\\Field\\\\PageBuilderFieldEncoder\\:\\:canDecode\\(\\) expects string, class\\-string\\|false given\\.$#" | ||
count: 1 | ||
path: src/lib/Encoder/Field/PageBuilderFieldEncoder.php | ||
path: tests/lib/Encoder/Field/PageBuilderFieldEncoderTest.php | ||
|
||
- | ||
message: "#^Parameter \\$blockDefinitionFactory of method Ibexa\\\\AutomatedTranslation\\\\Encoder\\\\Field\\\\PageBuilderFieldEncoder\\:\\:__construct\\(\\) has invalid type Ibexa\\\\FieldTypePage\\\\FieldType\\\\Page\\\\Block\\\\Definition\\\\BlockDefinitionFactory\\.$#" | ||
count: 1 | ||
path: src/lib/Encoder/Field/PageBuilderFieldEncoder.php | ||
message: "#^Parameter \\#2 \\$blockDefinitionFactory of class Ibexa\\\\AutomatedTranslation\\\\Encoder\\\\Field\\\\PageBuilderFieldEncoder constructor expects Ibexa\\\\FieldTypePage\\\\FieldType\\\\Page\\\\Block\\\\Definition\\\\BlockDefinitionFactory, Ibexa\\\\FieldTypePage\\\\FieldType\\\\Page\\\\Block\\\\Definition\\\\BlockDefinitionFactoryInterface given\\.$#" | ||
count: 4 | ||
path: tests/lib/Encoder/Field/PageBuilderFieldEncoderTest.php | ||
|
||
- | ||
message: "#^Property Ibexa\\\\AutomatedTranslation\\\\Encoder\\\\Field\\\\PageBuilderFieldEncoder\\:\\:\\$blockDefinitionFactory has unknown class Ibexa\\\\FieldTypePage\\\\FieldType\\\\Page\\\\Block\\\\Definition\\\\BlockDefinitionFactory as its type\\.$#" | ||
message: "#^Return type of call to method PHPUnit\\\\Framework\\\\TestCase\\:\\:createMock\\(\\) contains unresolvable type\\.$#" | ||
count: 1 | ||
path: src/lib/Encoder/Field/PageBuilderFieldEncoder.php | ||
path: tests/lib/Encoder/Field/PageBuilderFieldEncoderTest.php | ||
|
||
- | ||
message: "#^Parameter \\#1 \\$function of function call_user_func_array expects callable\\(\\)\\: mixed, array\\{Ibexa\\\\Bundle\\\\AutomatedTranslation\\\\DependencyInjection\\\\IbexaAutomatedTranslationExtension, mixed\\} given\\.$#" | ||
count: 1 | ||
path: tests/bundle/DependencyInjection/IbexaAutomatedTranslationExtensionTest.php | ||
message: "#^Return type of call to method PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder\\<Ibexa\\\\AutomatedTranslation\\\\Encoder\\\\RichText\\\\RichTextEncoder\\>\\:\\:getMock\\(\\) contains unresolvable type\\.$#" | ||
count: 2 | ||
path: tests/lib/Encoder/Field/RichTextFieldEncoderTest.php | ||
|
||
- | ||
message: "#^Return type of call to method PHPUnit\\\\Framework\\\\MockObject\\\\MockBuilder\\<Ibexa\\\\AutomatedTranslation\\\\Encoder\\\\Field\\\\FieldEncoderManager\\>\\:\\:getMock\\(\\) contains unresolvable type\\.$#" | ||
count: 2 | ||
path: tests/lib/EncoderTest.php | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters