Skip to content
Open
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
45 changes: 33 additions & 12 deletions .github/workflows/backend-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ on:
jobs:
cs-fix:
name: Run code style check
runs-on: "ubuntu-22.04"
runs-on: "ubuntu-26.04"
strategy:
matrix:
php:
- '8.3'
- '8.4'
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v7

- uses: ibexa/gh-workflows/actions/composer-install@main
with:
Expand All @@ -27,21 +27,44 @@ jobs:

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

deptrac:
name: Deptrac
runs-on: "ubuntu-26.04"
strategy:
fail-fast: false
matrix:
php:
- '8.4'
steps:
- uses: actions/checkout@v7

- name: Install Composer dependencies
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 deptrac
run: composer run-script deptrac

tests:
name: Tests
runs-on: "ubuntu-22.04"
runs-on: "ubuntu-26.04"
timeout-minutes: 10

strategy:
fail-fast: false
matrix:
php:
- '8.3'
- '8.4'

steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v7

- name: Setup PHP Action
uses: shivammathur/setup-php@v2
Expand Down Expand Up @@ -80,17 +103,16 @@ jobs:
--health-timeout 5s
--health-retries 5
--tmpfs /var/lib/postgresql/data
runs-on: "ubuntu-22.04"
runs-on: "ubuntu-26.04"
timeout-minutes: 20

strategy:
matrix:
php:
- '8.3'
- '8.4'

steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v7

- name: Setup PHP Action
uses: shivammathur/setup-php@v2
Expand Down Expand Up @@ -132,17 +154,16 @@ jobs:
--health-timeout=5s
--health-retries=5
--tmpfs=/var/lib/mysql
runs-on: "ubuntu-22.04"
runs-on: "ubuntu-26.04"
timeout-minutes: 20

strategy:
matrix:
php:
- '8.3'
- '8.4'

steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v7

- name: Setup PHP Action
uses: shivammathur/setup-php@v2
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 @@ -14,11 +14,11 @@ on:
jobs:
frontend-test:
name: Frontend build test
runs-on: "ubuntu-24.04"
runs-on: "ubuntu-26.04"
timeout-minutes: 5

steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v7
- uses: actions/setup-node@v4
with:
node-version: '18'
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/rector.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ on:
jobs:
rector:
name: Run rector
runs-on: "ubuntu-22.04"
runs-on: "ubuntu-26.04"
strategy:
matrix:
php:
- '8.3'
- '8.4'
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v7

- uses: ibexa/gh-workflows/actions/composer-install@main
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
release:
runs-on: ubuntu-latest
runs-on: ubuntu-26.04

steps:
- uses: actions/checkout@master
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/.deptrac.cache
/.php-cs-fixer.cache
/.phpunit.result.cache
/composer.lock
Expand Down
10 changes: 7 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
},
"require-dev": {
"dama/doctrine-test-bundle": "^8.2",
"deptrac/deptrac": "^4.7",
"ibexa/code-style": "~2.0.0",
"ibexa/rector": "~6.0.x-dev",
"ibexa/test-core": "~6.0.x-dev",
Expand All @@ -30,7 +31,8 @@
"psr-4": {
"Ibexa\\Bundle\\CorePersistence\\": "src/bundle/",
"Ibexa\\Contracts\\CorePersistence\\": "src/contracts/",
"Ibexa\\CorePersistence\\": "src/lib/"
"Ibexa\\CorePersistence\\": "src/lib/",
"Ibexa\\InternalContracts\\CorePersistence\\": "src/internal-contracts/"
}
},
"autoload-dev": {
Expand All @@ -45,13 +47,15 @@
"check-cs": "@fix-cs --dry-run",
"test": "phpunit -c phpunit.xml.dist",
"test-integration": "phpunit -c phpunit.integration.xml",
"phpstan": "phpstan analyse -c phpstan.neon"
"phpstan": "phpstan analyse -c phpstan.neon",
"deptrac": "php vendor/bin/deptrac analyse"
},
"scripts-descriptions": {
"fix-cs": "Automatically fixes code style in all files",
"check-cs": "Run code style checker for all files",
"test": "Run automatic tests",
"phpstan": "Run static code analysis"
"phpstan": "Run static code analysis",
"deptrac": "Run Deptrac architecture testing"
},
"extra": {
"branch-alias": {
Expand Down
8 changes: 8 additions & 0 deletions deptrac.baseline.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
deptrac:
skip_violations:
Ibexa\Contracts\CorePersistence\Gateway\AbstractDoctrineDatabase:
- Ibexa\CorePersistence\Gateway\ExpressionVisitor
- Ibexa\CorePersistence\Gateway\RelationshipTypeStrategyRegistry
Ibexa\Contracts\CorePersistence\Gateway\AbstractTranslationGateway:
- Ibexa\CorePersistence\Gateway\ExpressionVisitor
- Ibexa\CorePersistence\Gateway\RelationshipTypeStrategyRegistry
29 changes: 20 additions & 9 deletions deptrac.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,37 @@
imports:
- deptrac.baseline.yaml

deptrac:
paths:
- ./src
- ./tests
layers:
- name: Bundle
collectors:
- type: directory
value: bundle/.*
value: src/bundle/.*
- type: directory
value: src/lib/.*
- name: Contracts
collectors:
- type: directory
value: contracts/.*
- name: Library
value: src/contracts/.*
- name: InternalContracts
collectors:
- type: directory
value: src/internal-contracts/.*
- name: Test
collectors:
- type: directory
value: lib/.*
value: tests/.*
ruleset:
Bundle:
- Bundle
- Contracts
- Library
Contracts:
- InternalContracts
Contracts: ~
InternalContracts:
- Contracts
Library:
Test:
- Bundle
- Contracts
- Library
- InternalContracts
Empty file added src/internal-contracts/.gitkeep
Empty file.
Loading