Skip to content

Commit 0984562

Browse files
authored
Merge branch '4.6' into reinstall-schema
2 parents da2fe07 + 37e312c commit 0984562

File tree

226 files changed

+6426
-2135
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

226 files changed

+6426
-2135
lines changed

.github/workflows/backend-ci.yaml

Lines changed: 232 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,232 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- '[0-9]+.[0-9]+'
8+
pull_request: ~
9+
10+
jobs:
11+
cs-fix:
12+
name: Run code style check
13+
runs-on: "ubuntu-24.04"
14+
strategy:
15+
matrix:
16+
php:
17+
- '8.1'
18+
steps:
19+
- uses: actions/checkout@v6
20+
21+
- uses: ibexa/gh-workflows/actions/composer-install@main
22+
with:
23+
gh-client-id: ${{ secrets.AUTOMATION_CLIENT_ID }}
24+
gh-client-secret: ${{ secrets.AUTOMATION_CLIENT_SECRET }}
25+
satis-network-key: ${{ secrets.SATIS_NETWORK_KEY }}
26+
satis-network-token: ${{ secrets.SATIS_NETWORK_TOKEN }}
27+
28+
- name: Run code style check
29+
run: composer run-script check-cs -- --format=checkstyle | cs2pr
30+
31+
tests:
32+
name: Unit tests & SQLite integration tests
33+
runs-on: "ubuntu-24.04"
34+
timeout-minutes: 15
35+
36+
strategy:
37+
fail-fast: false
38+
matrix:
39+
php:
40+
- '7.4'
41+
- '8.3'
42+
- '8.4'
43+
44+
steps:
45+
- uses: actions/checkout@v6
46+
47+
- uses: ibexa/gh-workflows/actions/composer-install@main
48+
with:
49+
gh-client-id: ${{ secrets.AUTOMATION_CLIENT_ID }}
50+
gh-client-secret: ${{ secrets.AUTOMATION_CLIENT_SECRET }}
51+
satis-network-key: ${{ secrets.SATIS_NETWORK_KEY }}
52+
satis-network-token: ${{ secrets.SATIS_NETWORK_TOKEN }}
53+
54+
- name: Setup problem matchers for PHPUnit
55+
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
56+
57+
- name: Run PHPStan analysis
58+
run: composer run-script phpstan
59+
60+
- name: Run unit test suite
61+
run: composer run-script unit
62+
63+
- name: Run integration test suite
64+
run: composer run-script integration
65+
66+
integration-tests-postgres:
67+
name: PostgreSQL integration tests
68+
needs: tests
69+
services:
70+
postgres:
71+
image: ${{ matrix.image }}
72+
ports:
73+
- 5432
74+
env:
75+
POSTGRES_PASSWORD: postgres
76+
POSTGRES_DB: testdb
77+
options: >-
78+
--health-cmd pg_isready
79+
--health-interval 10s
80+
--health-timeout 5s
81+
--health-retries 5
82+
--tmpfs /var/lib/postgres
83+
runs-on: "ubuntu-24.04"
84+
timeout-minutes: 60
85+
86+
strategy:
87+
fail-fast: false
88+
matrix:
89+
php:
90+
- '7.4'
91+
- '8.3'
92+
- '8.4'
93+
doctrine-persistence:
94+
- 'doctrine/persistence:^2.0'
95+
- 'doctrine/persistence:^3.0'
96+
image:
97+
- 'postgres:14'
98+
- 'postgres:18'
99+
100+
steps:
101+
- uses: actions/checkout@v6
102+
103+
- uses: ibexa/gh-workflows/actions/composer-install@main
104+
with:
105+
gh-client-id: ${{ secrets.AUTOMATION_CLIENT_ID }}
106+
gh-client-secret: ${{ secrets.AUTOMATION_CLIENT_SECRET }}
107+
satis-network-key: ${{ secrets.SATIS_NETWORK_KEY }}
108+
satis-network-token: ${{ secrets.SATIS_NETWORK_TOKEN }}
109+
composer-options: "--with ${{ matrix.doctrine-persistence }}"
110+
111+
- name: Setup problem matchers for PHPUnit
112+
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
113+
114+
- name: Run integration test suite vs Postgresql
115+
run: composer run-script integration
116+
env:
117+
DATABASE_URL: "pgsql://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/testdb?server_version=10"
118+
# Required by old repository tests
119+
DATABASE: "pgsql://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/testdb"
120+
121+
integration-tests-mysql:
122+
name: MySQL integration tests
123+
needs: tests
124+
services:
125+
mysql:
126+
image: ${{ matrix.image }}
127+
ports:
128+
- 3306/tcp
129+
env:
130+
MYSQL_RANDOM_ROOT_PASSWORD: true
131+
MYSQL_USER: mysql
132+
MYSQL_PASSWORD: mysql
133+
MYSQL_DATABASE: testdb
134+
options: >-
135+
--health-cmd="mysqladmin ping"
136+
--health-interval=10s
137+
--health-timeout=5s
138+
--health-retries=5
139+
--tmpfs=/var/lib/mysql
140+
runs-on: "ubuntu-24.04"
141+
timeout-minutes: 60
142+
143+
strategy:
144+
fail-fast: false
145+
matrix:
146+
php:
147+
- '7.4'
148+
- '8.3'
149+
- '8.4'
150+
doctrine-persistence:
151+
- 'doctrine/persistence:^2.0'
152+
- 'doctrine/persistence:^3.0'
153+
image:
154+
- 'mysql:8.0'
155+
- 'mysql:8.4'
156+
157+
steps:
158+
- uses: actions/checkout@v6
159+
160+
- uses: ibexa/gh-workflows/actions/composer-install@main
161+
with:
162+
gh-client-id: ${{ secrets.AUTOMATION_CLIENT_ID }}
163+
gh-client-secret: ${{ secrets.AUTOMATION_CLIENT_SECRET }}
164+
satis-network-key: ${{ secrets.SATIS_NETWORK_KEY }}
165+
satis-network-token: ${{ secrets.SATIS_NETWORK_TOKEN }}
166+
composer-options: "--with ${{ matrix.doctrine-persistence }}"
167+
168+
- name: Setup problem matchers for PHPUnit
169+
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
170+
171+
- name: Run integration test suite vs MySQL
172+
run: composer run-script integration
173+
env:
174+
DATABASE_URL: "mysql://mysql:mysql@127.0.0.1:${{ job.services.mysql.ports[3306] }}/testdb"
175+
DATABASE: "mysql://mysql:mysql@127.0.0.1:${{ job.services.mysql.ports[3306] }}/testdb"
176+
177+
solr-integration:
178+
name: "Solr integration tests"
179+
runs-on: "ubuntu-24.04"
180+
timeout-minutes: 30
181+
permissions:
182+
packages: read
183+
contents: read
184+
services:
185+
redis:
186+
image: redis
187+
ports:
188+
- 6379:6379
189+
options:
190+
--memory=60m
191+
solr:
192+
image: ghcr.io/ibexa/core/solr
193+
ports:
194+
- 8983:8983
195+
options: >-
196+
--health-cmd "solr status"
197+
--health-interval 10s
198+
--health-timeout 5s
199+
--health-retries 10
200+
strategy:
201+
fail-fast: false
202+
matrix:
203+
php:
204+
- '7.4'
205+
- '8.3'
206+
- '8.4'
207+
steps:
208+
- uses: actions/checkout@v6
209+
with:
210+
fetch-depth: 0
211+
212+
- name: Setup PHP Action
213+
uses: shivammathur/setup-php@v2
214+
with:
215+
php-version: ${{ matrix.php }}
216+
coverage: none
217+
218+
- name: Add solr dependency
219+
run: |
220+
VERSION=$(jq -r '.extra | ."branch-alias" | ."dev-main"' < composer.json)
221+
composer require --no-update "ibexa/solr:$VERSION"
222+
223+
- uses: ramsey/composer-install@v3
224+
with:
225+
dependency-versions: "highest"
226+
227+
- name: Run integration test suite
228+
run: composer test-integration-solr
229+
env:
230+
CUSTOM_CACHE_POOL: singleredis
231+
CACHE_HOST: 127.0.0.1
232+
CORES_SETUP: single

.github/workflows/browser-tests.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,4 @@ jobs:
1515
project-edition: 'oss'
1616
test-setup-phase-1: '--mode=standard --profile=core --suite=setup'
1717
test-suite: "--mode=standard --profile=core --tags='~@broken&&~@setup'"
18-
secrets:
19-
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
18+
secrets: inherit

0 commit comments

Comments
 (0)