From c7d9df30c1f77a9f62a962787a97838993923f1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Szo=C5=82tysek?= Date: Thu, 2 Oct 2025 15:06:59 +0200 Subject: [PATCH 01/11] IBX-10494: Included Postgres 18 on CI --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 6e152f3d77..bb4bd4953b 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -78,7 +78,7 @@ jobs: needs: tests services: postgres: - image: postgres:14 + image: postgres:18 ports: - 5432 env: From 17964ef37655b46b9408d00283eab3bb6f58fa71 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Szo=C5=82tysek?= Date: Thu, 2 Oct 2025 15:19:08 +0200 Subject: [PATCH 02/11] [CI] Align secrets for browser tests --- .github/workflows/browser-tests.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/browser-tests.yaml b/.github/workflows/browser-tests.yaml index dbc6cead37..59ec5eb630 100644 --- a/.github/workflows/browser-tests.yaml +++ b/.github/workflows/browser-tests.yaml @@ -16,6 +16,9 @@ jobs: test-setup-phase-1: '--mode=standard --profile=core --suite=setup' test-suite: "--mode=standard --profile=core --tags='~@broken&&~@setup'" secrets: + AUTOMATION_CLIENT_ID: ${{ secrets.AUTOMATION_CLIENT_ID }} + AUTOMATION_CLIENT_INSTALLATION: ${{ secrets.AUTOMATION_CLIENT_INSTALLATION }} + AUTOMATION_CLIENT_SECRET: ${{ secrets.AUTOMATION_CLIENT_SECRET }} SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} AUTOMATION_CLIENT_ID: ${{ secrets.AUTOMATION_CLIENT_ID }} AUTOMATION_CLIENT_INSTALLATION: ${{ secrets.AUTOMATION_CLIENT_INSTALLATION }} From 2f6c92aa007011c00eeada837a68175e77f46774 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Niedzielski?= Date: Mon, 6 Oct 2025 11:30:19 +0200 Subject: [PATCH 03/11] Fixed inconsistent test --- .../Repository/Filtering/BaseRepositoryFilteringTestCase.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/integration/Core/Repository/Filtering/BaseRepositoryFilteringTestCase.php b/tests/integration/Core/Repository/Filtering/BaseRepositoryFilteringTestCase.php index 6118035a9a..ed3129cdcd 100644 --- a/tests/integration/Core/Repository/Filtering/BaseRepositoryFilteringTestCase.php +++ b/tests/integration/Core/Repository/Filtering/BaseRepositoryFilteringTestCase.php @@ -268,7 +268,7 @@ public function getCriteriaForInitialData(): iterable yield 'Sibling IN 2, 1]' => new Criterion\Sibling(2, 1); yield 'Subtree=/1/2/' => new Criterion\Subtree('/1/2/'); yield 'UserEmail=admin@link.invalid' => new Criterion\UserEmail('admin@link.invalid'); - yield 'UserEmail=admin@*' => new Criterion\UserEmail('*@link.invalid', Criterion\Operator::LIKE); + yield 'UserEmail=admin@*' => new Criterion\UserEmail('admin@*', Criterion\Operator::LIKE); yield 'UserId=14' => new Criterion\UserId(14); yield 'UserLogin=admin' => new Criterion\UserLogin('admin'); yield 'UserLogin=a*' => new Criterion\UserLogin('a*', Criterion\Operator::LIKE); From fc038355b65409853224acad33c9dab5b521017e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Szo=C5=82tysek?= Date: Mon, 6 Oct 2025 16:38:39 +0200 Subject: [PATCH 04/11] Postgres 14 & 18 setup --- .github/workflows/ci.yaml | 57 +++++++++++++++++++++++++++++++++++++-- 1 file changed, 55 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index bb4bd4953b..1bd324c34a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -73,8 +73,61 @@ jobs: - name: Run integration test suite run: composer run-script integration - integration-tests-postgres: - name: PostgreSQL integration tests + integration-tests-postgres-14: + name: PostgreSQL integration tests (14) + needs: tests + services: + postgres: + image: postgres:14 + ports: + - 5432 + env: + POSTGRES_PASSWORD: postgres + POSTGRES_DB: testdb + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + --tmpfs /var/lib/postgres + runs-on: "ubuntu-24.04" + timeout-minutes: 60 + + strategy: + fail-fast: false + matrix: + php: + - '7.4' + - '8.0' + - '8.1' + + steps: + - uses: actions/checkout@v2 + + - name: Setup PHP Action + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + coverage: none + extensions: pdo_pgsql, gd + tools: cs2pr + + - uses: "ramsey/composer-install@v1" + with: + dependency-versions: "highest" + + - name: Setup problem matchers for PHPUnit + run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + + - name: Run integration test suite vs Postgresql + run: composer run-script integration + env: + DATABASE_URL: "pgsql://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/testdb?server_version=10" + # Required by old repository tests + DATABASE: "pgsql://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/testdb" + + integration-tests-postgres-18: + name: PostgreSQL integration tests (18) needs: tests services: postgres: From a4776ebe36227fa5bc2ac1456b929aa98008224e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Szo=C5=82tysek?= Date: Mon, 6 Oct 2025 16:44:48 +0200 Subject: [PATCH 05/11] Revert "[CI] Align secrets for browser tests" This reverts commit e1a15c142954d3285286b42c473d4e6635da5dc1. --- .github/workflows/browser-tests.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/browser-tests.yaml b/.github/workflows/browser-tests.yaml index 59ec5eb630..dbc6cead37 100644 --- a/.github/workflows/browser-tests.yaml +++ b/.github/workflows/browser-tests.yaml @@ -16,9 +16,6 @@ jobs: test-setup-phase-1: '--mode=standard --profile=core --suite=setup' test-suite: "--mode=standard --profile=core --tags='~@broken&&~@setup'" secrets: - AUTOMATION_CLIENT_ID: ${{ secrets.AUTOMATION_CLIENT_ID }} - AUTOMATION_CLIENT_INSTALLATION: ${{ secrets.AUTOMATION_CLIENT_INSTALLATION }} - AUTOMATION_CLIENT_SECRET: ${{ secrets.AUTOMATION_CLIENT_SECRET }} SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} AUTOMATION_CLIENT_ID: ${{ secrets.AUTOMATION_CLIENT_ID }} AUTOMATION_CLIENT_INSTALLATION: ${{ secrets.AUTOMATION_CLIENT_INSTALLATION }} From b2bcb27b7c528cfd32e2a3eb467fc84c5f401f77 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Szo=C5=82tysek?= Date: Tue, 14 Oct 2025 11:08:45 +0200 Subject: [PATCH 06/11] Secrets for browser-tests (inherit) --- .github/workflows/browser-tests.yaml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/browser-tests.yaml b/.github/workflows/browser-tests.yaml index dbc6cead37..2df052f645 100644 --- a/.github/workflows/browser-tests.yaml +++ b/.github/workflows/browser-tests.yaml @@ -15,8 +15,4 @@ jobs: project-edition: 'oss' test-setup-phase-1: '--mode=standard --profile=core --suite=setup' test-suite: "--mode=standard --profile=core --tags='~@broken&&~@setup'" - secrets: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - AUTOMATION_CLIENT_ID: ${{ secrets.AUTOMATION_CLIENT_ID }} - AUTOMATION_CLIENT_INSTALLATION: ${{ secrets.AUTOMATION_CLIENT_INSTALLATION }} - AUTOMATION_CLIENT_SECRET: ${{ secrets.AUTOMATION_CLIENT_SECRET }} + secrets: inherit From e0995fd6299a371cd42c8f78ae1a307f7be50b22 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Szo=C5=82tysek?= Date: Tue, 14 Oct 2025 11:09:21 +0200 Subject: [PATCH 07/11] Image in matrix for Postgres int tests --- .github/workflows/ci.yaml | 62 ++++----------------------------------- 1 file changed, 6 insertions(+), 56 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1bd324c34a..1e994a6fed 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -73,12 +73,12 @@ jobs: - name: Run integration test suite run: composer run-script integration - integration-tests-postgres-14: - name: PostgreSQL integration tests (14) + integration-tests-postgres: + name: PostgreSQL integration tests needs: tests services: postgres: - image: postgres:14 + image: ${{ matrix.image }} ports: - 5432 env: @@ -100,6 +100,9 @@ jobs: - '7.4' - '8.0' - '8.1' + image: + - 'postgres:14' + - 'postgres:18' steps: - uses: actions/checkout@v2 @@ -126,59 +129,6 @@ jobs: # Required by old repository tests DATABASE: "pgsql://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/testdb" - integration-tests-postgres-18: - name: PostgreSQL integration tests (18) - needs: tests - services: - postgres: - image: postgres:18 - ports: - - 5432 - env: - POSTGRES_PASSWORD: postgres - POSTGRES_DB: testdb - options: >- - --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 - --tmpfs /var/lib/postgres - runs-on: "ubuntu-24.04" - timeout-minutes: 60 - - strategy: - fail-fast: false - matrix: - php: - - '7.4' - - '8.0' - - '8.1' - - steps: - - uses: actions/checkout@v5 - - - name: Setup PHP Action - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - coverage: none - extensions: pdo_pgsql, gd - tools: cs2pr - - - uses: ramsey/composer-install@v3 - with: - dependency-versions: "highest" - - - name: Setup problem matchers for PHPUnit - run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - - - name: Run integration test suite vs Postgresql - run: composer run-script integration - env: - DATABASE_URL: "pgsql://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/testdb?server_version=10" - # Required by old repository tests - DATABASE: "pgsql://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/testdb" - integration-tests-mysql-80: name: MySQL integration tests (8.0) needs: tests From 93f659e572aeb0bf3ea183c3abbf72daced57301 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Szo=C5=82tysek?= Date: Tue, 14 Oct 2025 11:36:04 +0200 Subject: [PATCH 08/11] Image in matrix for MySQL int tests --- .github/workflows/ci.yaml | 63 ++++----------------------------------- 1 file changed, 6 insertions(+), 57 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1e994a6fed..2af4bcf0d9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -129,66 +129,12 @@ jobs: # Required by old repository tests DATABASE: "pgsql://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/testdb" - integration-tests-mysql-80: - name: MySQL integration tests (8.0) + integration-tests-mysql: + name: MySQL integration tests needs: tests services: mysql: - image: mysql:8.0 - ports: - - 3306/tcp - env: - MYSQL_RANDOM_ROOT_PASSWORD: true - MYSQL_USER: mysql - MYSQL_PASSWORD: mysql - MYSQL_DATABASE: testdb - options: >- - --health-cmd="mysqladmin ping" - --health-interval=10s - --health-timeout=5s - --health-retries=5 - --tmpfs=/var/lib/mysql - runs-on: "ubuntu-24.04" - timeout-minutes: 60 - - strategy: - fail-fast: false - matrix: - php: - - '7.4' - - '8.0' - - '8.1' - - steps: - - uses: actions/checkout@v5 - - - name: Setup PHP Action - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - coverage: none - extensions: pdo_mysql, gd, redis - tools: cs2pr - - - uses: ramsey/composer-install@v3 - with: - dependency-versions: "highest" - - - name: Setup problem matchers for PHPUnit - run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - - - name: Run integration test suite vs MySQL - run: composer run-script integration - env: - DATABASE_URL: "mysql://mysql:mysql@127.0.0.1:${{ job.services.mysql.ports[3306] }}/testdb" - DATABASE: "mysql://mysql:mysql@127.0.0.1:${{ job.services.mysql.ports[3306] }}/testdb" - - integration-tests-mysql-84: - name: MySQL integration tests (8.4) - needs: tests - services: - mysql: - image: mysql:8.4 + image: ${{ matrix.image }} ports: - 3306/tcp env: @@ -212,6 +158,9 @@ jobs: - '7.4' - '8.0' - '8.1' + image: + - 'mysql:8.0' + - 'mysql:8.4' steps: - uses: actions/checkout@v5 From f7b388939df9397a2fe3efd33f70a0b80cc18a76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Szo=C5=82tysek?= Date: Tue, 14 Oct 2025 12:00:29 +0200 Subject: [PATCH 09/11] Dedicated action for installation of composer packages --- .github/workflows/ci.yaml | 98 ++++++++++++++++----------------------- 1 file changed, 39 insertions(+), 59 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2af4bcf0d9..4b92058d09 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -18,17 +18,12 @@ jobs: steps: - uses: actions/checkout@v5 - - name: Setup PHP Action - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - coverage: none - extensions: 'pdo_sqlite, gd' - tools: cs2pr - - - uses: ramsey/composer-install@v3 + - uses: ibexa/gh-workflows/actions/composer-install@main with: - dependency-versions: "highest" + 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 @@ -49,17 +44,12 @@ jobs: steps: - uses: actions/checkout@v5 - - name: Setup PHP Action - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - coverage: none - extensions: pdo_sqlite, gd - tools: cs2pr - - - uses: ramsey/composer-install@v3 + - uses: ibexa/gh-workflows/actions/composer-install@main with: - dependency-versions: "highest" + 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: Setup problem matchers for PHPUnit run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" @@ -105,29 +95,24 @@ jobs: - 'postgres:18' steps: - - uses: actions/checkout@v2 - - - name: Setup PHP Action - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - coverage: none - extensions: pdo_pgsql, gd - tools: cs2pr + - uses: actions/checkout@v5 - - uses: "ramsey/composer-install@v1" - with: - dependency-versions: "highest" + - 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: Setup problem matchers for PHPUnit - run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + - name: Setup problem matchers for PHPUnit + run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - - name: Run integration test suite vs Postgresql - run: composer run-script integration - env: - DATABASE_URL: "pgsql://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/testdb?server_version=10" - # Required by old repository tests - DATABASE: "pgsql://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/testdb" + - name: Run integration test suite vs Postgresql + run: composer run-script integration + env: + DATABASE_URL: "pgsql://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/testdb?server_version=10" + # Required by old repository tests + DATABASE: "pgsql://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/testdb" integration-tests-mysql: name: MySQL integration tests @@ -163,28 +148,23 @@ jobs: - 'mysql:8.4' steps: - - uses: actions/checkout@v5 - - - name: Setup PHP Action - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - coverage: none - extensions: pdo_mysql, gd, redis - tools: cs2pr + - uses: actions/checkout@v5 - - uses: ramsey/composer-install@v3 - with: - dependency-versions: "highest" + - 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: Setup problem matchers for PHPUnit - run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + - name: Setup problem matchers for PHPUnit + run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - - name: Run integration test suite vs MySQL - run: composer run-script integration - env: - DATABASE_URL: "mysql://mysql:mysql@127.0.0.1:${{ job.services.mysql.ports[3306] }}/testdb" - DATABASE: "mysql://mysql:mysql@127.0.0.1:${{ job.services.mysql.ports[3306] }}/testdb" + - name: Run integration test suite vs MySQL + run: composer run-script integration + env: + DATABASE_URL: "mysql://mysql:mysql@127.0.0.1:${{ job.services.mysql.ports[3306] }}/testdb" + DATABASE: "mysql://mysql:mysql@127.0.0.1:${{ job.services.mysql.ports[3306] }}/testdb" solr-integration: name: "Solr integration tests" From 193c68de74978979870bc49537b3c6ac7578d7a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Szo=C5=82tysek?= Date: Tue, 14 Oct 2025 12:10:22 +0200 Subject: [PATCH 10/11] reformat code --- .github/workflows/ci.yaml | 438 +++++++++++++++++++------------------- 1 file changed, 219 insertions(+), 219 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4b92058d09..4df1214d79 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,224 +1,224 @@ name: CI on: - push: - branches: - - main - - '[0-9]+.[0-9]+' - pull_request: ~ + push: + branches: + - main + - '[0-9]+.[0-9]+' + pull_request: ~ jobs: - cs-fix: - name: Run code style check - runs-on: "ubuntu-24.04" - strategy: - matrix: - php: - - '8.1' - steps: - - uses: actions/checkout@v5 - - - 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 code style check - run: composer run-script check-cs -- --format=checkstyle | cs2pr - - tests: - name: Unit tests & SQLite integration tests - runs-on: "ubuntu-24.04" - timeout-minutes: 15 - - strategy: - fail-fast: false - matrix: - php: - - '7.4' - - '8.0' - - '8.1' - - steps: - - uses: actions/checkout@v5 - - - 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: 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 unit test suite - run: composer run-script unit - - - name: Run integration test suite - run: composer run-script integration - - integration-tests-postgres: - name: PostgreSQL integration tests - needs: tests - services: - postgres: - image: ${{ matrix.image }} - ports: - - 5432 - env: - POSTGRES_PASSWORD: postgres - POSTGRES_DB: testdb - options: >- - --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 - --tmpfs /var/lib/postgres - runs-on: "ubuntu-24.04" - timeout-minutes: 60 - - strategy: - fail-fast: false - matrix: - php: - - '7.4' - - '8.0' - - '8.1' - image: - - 'postgres:14' - - 'postgres:18' - - steps: - - uses: actions/checkout@v5 - - - 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: Setup problem matchers for PHPUnit - run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - - - name: Run integration test suite vs Postgresql - run: composer run-script integration - env: - DATABASE_URL: "pgsql://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/testdb?server_version=10" - # Required by old repository tests - DATABASE: "pgsql://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/testdb" - - integration-tests-mysql: - name: MySQL integration tests - needs: tests - services: - mysql: - image: ${{ matrix.image }} - ports: - - 3306/tcp - env: - MYSQL_RANDOM_ROOT_PASSWORD: true - MYSQL_USER: mysql - MYSQL_PASSWORD: mysql - MYSQL_DATABASE: testdb - options: >- - --health-cmd="mysqladmin ping" - --health-interval=10s - --health-timeout=5s - --health-retries=5 - --tmpfs=/var/lib/mysql - runs-on: "ubuntu-24.04" - timeout-minutes: 60 - - strategy: - fail-fast: false - matrix: - php: - - '7.4' - - '8.0' - - '8.1' - image: - - 'mysql:8.0' - - 'mysql:8.4' - - steps: - - uses: actions/checkout@v5 - - - 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: Setup problem matchers for PHPUnit - run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - - - name: Run integration test suite vs MySQL - run: composer run-script integration - env: - DATABASE_URL: "mysql://mysql:mysql@127.0.0.1:${{ job.services.mysql.ports[3306] }}/testdb" - DATABASE: "mysql://mysql:mysql@127.0.0.1:${{ job.services.mysql.ports[3306] }}/testdb" - - solr-integration: - name: "Solr integration tests" - runs-on: "ubuntu-24.04" - timeout-minutes: 30 - permissions: - packages: read - contents: read - services: - redis: - image: redis - ports: - - 6379:6379 - options: - --memory=60m - solr: - image: ghcr.io/ibexa/core/solr - ports: - - 8983:8983 - options: >- - --health-cmd "solr status" - --health-interval 10s - --health-timeout 5s - --health-retries 10 - strategy: - fail-fast: false - matrix: - php: - - '7.4' - - '8.0' - - '8.1' - steps: - - uses: actions/checkout@v5 - with: - fetch-depth: 0 - - - name: Setup PHP Action - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - coverage: none - - - name: Add solr dependency - run: | - VERSION=$(jq -r '.extra | ."branch-alias" | ."dev-main"' < composer.json) - composer require --no-update "ibexa/solr:$VERSION" - - - uses: ramsey/composer-install@v3 - with: - dependency-versions: "highest" - - - name: Run integration test suite - run: composer test-integration-solr - env: - CUSTOM_CACHE_POOL: singleredis - CACHE_HOST: 127.0.0.1 - CORES_SETUP: single + cs-fix: + name: Run code style check + runs-on: "ubuntu-24.04" + strategy: + matrix: + php: + - '8.1' + steps: + - uses: actions/checkout@v5 + + - 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 code style check + run: composer run-script check-cs -- --format=checkstyle | cs2pr + + tests: + name: Unit tests & SQLite integration tests + runs-on: "ubuntu-24.04" + timeout-minutes: 15 + + strategy: + fail-fast: false + matrix: + php: + - '7.4' + - '8.0' + - '8.1' + + steps: + - uses: actions/checkout@v5 + + - 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: 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 unit test suite + run: composer run-script unit + + - name: Run integration test suite + run: composer run-script integration + + integration-tests-postgres: + name: PostgreSQL integration tests + needs: tests + services: + postgres: + image: ${{ matrix.image }} + ports: + - 5432 + env: + POSTGRES_PASSWORD: postgres + POSTGRES_DB: testdb + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + --tmpfs /var/lib/postgres + runs-on: "ubuntu-24.04" + timeout-minutes: 60 + + strategy: + fail-fast: false + matrix: + php: + - '7.4' + - '8.0' + - '8.1' + image: + - 'postgres:14' + - 'postgres:18' + + steps: + - uses: actions/checkout@v5 + + - 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: Setup problem matchers for PHPUnit + run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + + - name: Run integration test suite vs Postgresql + run: composer run-script integration + env: + DATABASE_URL: "pgsql://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/testdb?server_version=10" + # Required by old repository tests + DATABASE: "pgsql://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/testdb" + + integration-tests-mysql: + name: MySQL integration tests + needs: tests + services: + mysql: + image: ${{ matrix.image }} + ports: + - 3306/tcp + env: + MYSQL_RANDOM_ROOT_PASSWORD: true + MYSQL_USER: mysql + MYSQL_PASSWORD: mysql + MYSQL_DATABASE: testdb + options: >- + --health-cmd="mysqladmin ping" + --health-interval=10s + --health-timeout=5s + --health-retries=5 + --tmpfs=/var/lib/mysql + runs-on: "ubuntu-24.04" + timeout-minutes: 60 + + strategy: + fail-fast: false + matrix: + php: + - '7.4' + - '8.0' + - '8.1' + image: + - 'mysql:8.0' + - 'mysql:8.4' + + steps: + - uses: actions/checkout@v5 + + - 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: Setup problem matchers for PHPUnit + run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + + - name: Run integration test suite vs MySQL + run: composer run-script integration + env: + DATABASE_URL: "mysql://mysql:mysql@127.0.0.1:${{ job.services.mysql.ports[3306] }}/testdb" + DATABASE: "mysql://mysql:mysql@127.0.0.1:${{ job.services.mysql.ports[3306] }}/testdb" + + solr-integration: + name: "Solr integration tests" + runs-on: "ubuntu-24.04" + timeout-minutes: 30 + permissions: + packages: read + contents: read + services: + redis: + image: redis + ports: + - 6379:6379 + options: + --memory=60m + solr: + image: ghcr.io/ibexa/core/solr + ports: + - 8983:8983 + options: >- + --health-cmd "solr status" + --health-interval 10s + --health-timeout 5s + --health-retries 10 + strategy: + fail-fast: false + matrix: + php: + - '7.4' + - '8.0' + - '8.1' + steps: + - uses: actions/checkout@v5 + with: + fetch-depth: 0 + + - name: Setup PHP Action + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + coverage: none + + - name: Add solr dependency + run: | + VERSION=$(jq -r '.extra | ."branch-alias" | ."dev-main"' < composer.json) + composer require --no-update "ibexa/solr:$VERSION" + + - uses: ramsey/composer-install@v3 + with: + dependency-versions: "highest" + + - name: Run integration test suite + run: composer test-integration-solr + env: + CUSTOM_CACHE_POOL: singleredis + CACHE_HOST: 127.0.0.1 + CORES_SETUP: single From 6c69e50f4d86c9d933f64c55e8c376f240daa8cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Szo=C5=82tysek?= Date: Tue, 14 Oct 2025 12:20:35 +0200 Subject: [PATCH 11/11] fixup! reformat code --- .github/workflows/ci.yaml | 438 +++++++++++++++++++------------------- 1 file changed, 219 insertions(+), 219 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4df1214d79..98ab313e7a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,224 +1,224 @@ name: CI on: - push: - branches: - - main - - '[0-9]+.[0-9]+' - pull_request: ~ + push: + branches: + - main + - '[0-9]+.[0-9]+' + pull_request: ~ jobs: - cs-fix: - name: Run code style check - runs-on: "ubuntu-24.04" - strategy: - matrix: - php: - - '8.1' - steps: - - uses: actions/checkout@v5 - - - 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 code style check - run: composer run-script check-cs -- --format=checkstyle | cs2pr - - tests: - name: Unit tests & SQLite integration tests - runs-on: "ubuntu-24.04" - timeout-minutes: 15 - - strategy: - fail-fast: false - matrix: - php: - - '7.4' - - '8.0' - - '8.1' - - steps: - - uses: actions/checkout@v5 - - - 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: 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 unit test suite - run: composer run-script unit - - - name: Run integration test suite - run: composer run-script integration - - integration-tests-postgres: - name: PostgreSQL integration tests - needs: tests - services: - postgres: - image: ${{ matrix.image }} - ports: - - 5432 - env: - POSTGRES_PASSWORD: postgres - POSTGRES_DB: testdb - options: >- - --health-cmd pg_isready - --health-interval 10s - --health-timeout 5s - --health-retries 5 - --tmpfs /var/lib/postgres - runs-on: "ubuntu-24.04" - timeout-minutes: 60 - - strategy: - fail-fast: false - matrix: - php: - - '7.4' - - '8.0' - - '8.1' - image: - - 'postgres:14' - - 'postgres:18' - - steps: - - uses: actions/checkout@v5 - - - 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: Setup problem matchers for PHPUnit - run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - - - name: Run integration test suite vs Postgresql - run: composer run-script integration - env: - DATABASE_URL: "pgsql://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/testdb?server_version=10" - # Required by old repository tests - DATABASE: "pgsql://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/testdb" - - integration-tests-mysql: - name: MySQL integration tests - needs: tests - services: - mysql: - image: ${{ matrix.image }} - ports: - - 3306/tcp - env: - MYSQL_RANDOM_ROOT_PASSWORD: true - MYSQL_USER: mysql - MYSQL_PASSWORD: mysql - MYSQL_DATABASE: testdb - options: >- - --health-cmd="mysqladmin ping" - --health-interval=10s - --health-timeout=5s - --health-retries=5 - --tmpfs=/var/lib/mysql - runs-on: "ubuntu-24.04" - timeout-minutes: 60 - - strategy: - fail-fast: false - matrix: - php: - - '7.4' - - '8.0' - - '8.1' - image: - - 'mysql:8.0' - - 'mysql:8.4' - - steps: - - uses: actions/checkout@v5 - - - 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: Setup problem matchers for PHPUnit - run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" - - - name: Run integration test suite vs MySQL - run: composer run-script integration - env: - DATABASE_URL: "mysql://mysql:mysql@127.0.0.1:${{ job.services.mysql.ports[3306] }}/testdb" - DATABASE: "mysql://mysql:mysql@127.0.0.1:${{ job.services.mysql.ports[3306] }}/testdb" - - solr-integration: - name: "Solr integration tests" - runs-on: "ubuntu-24.04" - timeout-minutes: 30 - permissions: - packages: read - contents: read - services: - redis: - image: redis - ports: - - 6379:6379 - options: - --memory=60m - solr: - image: ghcr.io/ibexa/core/solr - ports: - - 8983:8983 - options: >- - --health-cmd "solr status" - --health-interval 10s - --health-timeout 5s - --health-retries 10 - strategy: - fail-fast: false - matrix: - php: - - '7.4' - - '8.0' - - '8.1' - steps: - - uses: actions/checkout@v5 - with: - fetch-depth: 0 - - - name: Setup PHP Action - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - coverage: none - - - name: Add solr dependency - run: | - VERSION=$(jq -r '.extra | ."branch-alias" | ."dev-main"' < composer.json) - composer require --no-update "ibexa/solr:$VERSION" - - - uses: ramsey/composer-install@v3 - with: - dependency-versions: "highest" - - - name: Run integration test suite - run: composer test-integration-solr - env: - CUSTOM_CACHE_POOL: singleredis - CACHE_HOST: 127.0.0.1 - CORES_SETUP: single + cs-fix: + name: Run code style check + runs-on: "ubuntu-24.04" + strategy: + matrix: + php: + - '8.1' + steps: + - uses: actions/checkout@v5 + + - 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 code style check + run: composer run-script check-cs -- --format=checkstyle | cs2pr + + tests: + name: Unit tests & SQLite integration tests + runs-on: "ubuntu-24.04" + timeout-minutes: 15 + + strategy: + fail-fast: false + matrix: + php: + - '7.4' + - '8.0' + - '8.1' + + steps: + - uses: actions/checkout@v5 + + - 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: 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 unit test suite + run: composer run-script unit + + - name: Run integration test suite + run: composer run-script integration + + integration-tests-postgres: + name: PostgreSQL integration tests + needs: tests + services: + postgres: + image: ${{ matrix.image }} + ports: + - 5432 + env: + POSTGRES_PASSWORD: postgres + POSTGRES_DB: testdb + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + --tmpfs /var/lib/postgres + runs-on: "ubuntu-24.04" + timeout-minutes: 60 + + strategy: + fail-fast: false + matrix: + php: + - '7.4' + - '8.0' + - '8.1' + image: + - 'postgres:14' + - 'postgres:18' + + steps: + - uses: actions/checkout@v5 + + - 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: Setup problem matchers for PHPUnit + run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + + - name: Run integration test suite vs Postgresql + run: composer run-script integration + env: + DATABASE_URL: "pgsql://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/testdb?server_version=10" + # Required by old repository tests + DATABASE: "pgsql://postgres:postgres@localhost:${{ job.services.postgres.ports[5432] }}/testdb" + + integration-tests-mysql: + name: MySQL integration tests + needs: tests + services: + mysql: + image: ${{ matrix.image }} + ports: + - 3306/tcp + env: + MYSQL_RANDOM_ROOT_PASSWORD: true + MYSQL_USER: mysql + MYSQL_PASSWORD: mysql + MYSQL_DATABASE: testdb + options: >- + --health-cmd="mysqladmin ping" + --health-interval=10s + --health-timeout=5s + --health-retries=5 + --tmpfs=/var/lib/mysql + runs-on: "ubuntu-24.04" + timeout-minutes: 60 + + strategy: + fail-fast: false + matrix: + php: + - '7.4' + - '8.0' + - '8.1' + image: + - 'mysql:8.0' + - 'mysql:8.4' + + steps: + - uses: actions/checkout@v5 + + - 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: Setup problem matchers for PHPUnit + run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" + + - name: Run integration test suite vs MySQL + run: composer run-script integration + env: + DATABASE_URL: "mysql://mysql:mysql@127.0.0.1:${{ job.services.mysql.ports[3306] }}/testdb" + DATABASE: "mysql://mysql:mysql@127.0.0.1:${{ job.services.mysql.ports[3306] }}/testdb" + + solr-integration: + name: "Solr integration tests" + runs-on: "ubuntu-24.04" + timeout-minutes: 30 + permissions: + packages: read + contents: read + services: + redis: + image: redis + ports: + - 6379:6379 + options: + --memory=60m + solr: + image: ghcr.io/ibexa/core/solr + ports: + - 8983:8983 + options: >- + --health-cmd "solr status" + --health-interval 10s + --health-timeout 5s + --health-retries 10 + strategy: + fail-fast: false + matrix: + php: + - '7.4' + - '8.0' + - '8.1' + steps: + - uses: actions/checkout@v5 + with: + fetch-depth: 0 + + - name: Setup PHP Action + uses: shivammathur/setup-php@v2 + with: + php-version: ${{ matrix.php }} + coverage: none + + - name: Add solr dependency + run: | + VERSION=$(jq -r '.extra | ."branch-alias" | ."dev-main"' < composer.json) + composer require --no-update "ibexa/solr:$VERSION" + + - uses: ramsey/composer-install@v3 + with: + dependency-versions: "highest" + + - name: Run integration test suite + run: composer test-integration-solr + env: + CUSTOM_CACHE_POOL: singleredis + CACHE_HOST: 127.0.0.1 + CORES_SETUP: single