From 39f6bb3bd141d20ecc2604fade5a7bd43c700f94 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Mon, 10 Nov 2025 15:41:33 +0400 Subject: [PATCH 01/10] chore: add php-sdk submodule for acceptance tests --- .gitmodules | 3 +++ tests/acceptance/php-sdk | 1 + 2 files changed, 4 insertions(+) create mode 100644 .gitmodules create mode 160000 tests/acceptance/php-sdk diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..6aa97b41 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "tests/acceptance/php-sdk"] + path = tests/acceptance/php-sdk + url = git@github.com:temporalio/sdk-php.git diff --git a/tests/acceptance/php-sdk b/tests/acceptance/php-sdk new file mode 160000 index 00000000..77eb97a1 --- /dev/null +++ b/tests/acceptance/php-sdk @@ -0,0 +1 @@ +Subproject commit 77eb97a1e4b1f2bf397003d361c13bb850bd1d05 From bd58b85e7869d97f86a06aeef00671e4532920b1 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Mon, 10 Nov 2025 16:31:04 +0400 Subject: [PATCH 02/10] ci: add acceptance tests workflow with PHP SDK --- .github/workflows/linux.yml | 55 +++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 877f6db9..cf304b7e 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -11,6 +11,61 @@ on: - stable jobs: + acceptance_test: + name: RR <-> PHP <-> Temporal Acceptance tests (Go ${{ matrix.go }}, PHP ${{ matrix.php }}, OS ${{matrix.os}}) + runs-on: ${{ matrix.os }} + timeout-minutes: 60 + strategy: + matrix: + php: [ "8.4" ] + go: [ stable ] + os: [ "ubuntu-latest" ] + steps: + - name: Set up Go ${{ matrix.go }} + uses: actions/setup-go@v6 # action page: + with: + go-version: ${{ matrix.go }} + + - name: Set up PHP ${{ matrix.php }} + uses: shivammathur/setup-php@v2 # action page: + with: + php-version: ${{ matrix.php }} + extensions: dom, sockets, grpc, curl, protobuf + + - name: Check out code + uses: actions/checkout@v5 + + - name: Install dependencies with composer + uses: ramsey/composer-install@v3 + with: + working-directory: tests/acceptance/php-sdk + + - name: Init Go modules Cache # Docs: + uses: actions/cache@v4 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} + restore-keys: ${{ runner.os }}-go- + + - name: Download binaries + run: | + cd tests/acceptance/php-sdk + vendor/bin/dload get temporal + vendor/bin/dload get temporal-tests-server + vendor/bin/dload get rr + + # todo: replace rr downloading with building + + - name: Run Functional tests + run: | + cd tests/acceptance/php-sdk + composer test:func + + - name: Run Acceptance tests + run: | + cd tests/acceptance/php-sdk + composer test:accept + rrtemporal_updates_test: name: RR Temporal updates tests with (Go ${{ matrix.go }}, PHP ${{ matrix.php }}, OS ${{matrix.os}}) runs-on: ${{ matrix.os }} From 1811ba0ac9742a10a40040b7897f5ed004396af7 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Mon, 10 Nov 2025 16:58:11 +0400 Subject: [PATCH 03/10] ci: enable submodule checkout in Linux CI workflow --- .github/workflows/linux.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index cf304b7e..728f31a3 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -34,6 +34,8 @@ jobs: - name: Check out code uses: actions/checkout@v5 + with: + submodules: true - name: Install dependencies with composer uses: ramsey/composer-install@v3 From 4324054cd81a9c676b174cd4c5438957e3eb56d4 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Tue, 11 Nov 2025 17:32:43 +0400 Subject: [PATCH 04/10] ci: Configure RR builder for acceptance tests --- .github/workflows/linux.yml | 10 ++++++++-- tests/acceptance/dload.xml | 20 ++++++++++++++++++++ tests/acceptance/velox.toml | 3 +++ 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 tests/acceptance/dload.xml create mode 100644 tests/acceptance/velox.toml diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 728f31a3..997abb10 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -54,16 +54,22 @@ jobs: cd tests/acceptance/php-sdk vendor/bin/dload get temporal vendor/bin/dload get temporal-tests-server - vendor/bin/dload get rr - # todo: replace rr downloading with building + - name: Build RoadRunner + run: | + cd tests/acceptance + php-sdk/vendor/bin/dload build - name: Run Functional tests + env: + ROADRUNNER_BINARY: './rr' run: | cd tests/acceptance/php-sdk composer test:func - name: Run Acceptance tests + env: + ROADRUNNER_BINARY: './rr' run: | cd tests/acceptance/php-sdk composer test:accept diff --git a/tests/acceptance/dload.xml b/tests/acceptance/dload.xml new file mode 100644 index 00000000..956696b8 --- /dev/null +++ b/tests/acceptance/dload.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + diff --git a/tests/acceptance/velox.toml b/tests/acceptance/velox.toml new file mode 100644 index 00000000..86949922 --- /dev/null +++ b/tests/acceptance/velox.toml @@ -0,0 +1,3 @@ +[log] +level = "debug" +mode = "production" From 9b105cc7ef7d7221c0a0a38fc71a1d398b1491f2 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Tue, 11 Nov 2025 17:40:19 +0400 Subject: [PATCH 05/10] chore: Hardcode velox and RR versions on building --- .github/workflows/linux.yml | 2 +- tests/acceptance/dload.xml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 997abb10..97dc55f2 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -58,7 +58,7 @@ jobs: - name: Build RoadRunner run: | cd tests/acceptance - php-sdk/vendor/bin/dload build + php-sdk/vendor/bin/dload build -vv - name: Run Functional tests env: diff --git a/tests/acceptance/dload.xml b/tests/acceptance/dload.xml index 956696b8..29da15fa 100644 --- a/tests/acceptance/dload.xml +++ b/tests/acceptance/dload.xml @@ -6,6 +6,8 @@ From 63de213160bc1701f712ccb41f207d46acdf353b Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Tue, 11 Nov 2025 22:25:18 +0400 Subject: [PATCH 06/10] ci: add GITHUB_TOKEN environment variable for RoadRunner build --- .github/workflows/linux.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 97dc55f2..8b55d7e5 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -56,6 +56,8 @@ jobs: vendor/bin/dload get temporal-tests-server - name: Build RoadRunner + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | cd tests/acceptance php-sdk/vendor/bin/dload build -vv From de37515b27d247a85d14a7d063d63eb6bd7f2004 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Tue, 11 Nov 2025 22:48:48 +0400 Subject: [PATCH 07/10] ci: add GITHUB_TOKEN environment variable for downloading binaries --- .github/workflows/linux.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 8b55d7e5..2b57e46a 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -50,6 +50,8 @@ jobs: restore-keys: ${{ runner.os }}-go- - name: Download binaries + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | cd tests/acceptance/php-sdk vendor/bin/dload get temporal From 356ac4783310e670e83ae8c8af373abd3a20e1f5 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Tue, 11 Nov 2025 22:50:10 +0400 Subject: [PATCH 08/10] chore: Update PHP SDK submodule --- .github/workflows/linux.yml | 8 ++++---- tests/acceptance/php-sdk | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 2b57e46a..d5795e67 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -64,19 +64,19 @@ jobs: cd tests/acceptance php-sdk/vendor/bin/dload build -vv - - name: Run Functional tests + - name: Run Acceptance tests env: ROADRUNNER_BINARY: './rr' run: | cd tests/acceptance/php-sdk - composer test:func + composer test:accept - - name: Run Acceptance tests + - name: Run Functional tests env: ROADRUNNER_BINARY: './rr' run: | cd tests/acceptance/php-sdk - composer test:accept + composer test:func rrtemporal_updates_test: name: RR Temporal updates tests with (Go ${{ matrix.go }}, PHP ${{ matrix.php }}, OS ${{matrix.os}}) diff --git a/tests/acceptance/php-sdk b/tests/acceptance/php-sdk index 77eb97a1..728df25d 160000 --- a/tests/acceptance/php-sdk +++ b/tests/acceptance/php-sdk @@ -1 +1 @@ -Subproject commit 77eb97a1e4b1f2bf397003d361c13bb850bd1d05 +Subproject commit 728df25dc3fdbd47699bb8c6fdb4807353d0d6cb From d8b031c8d619d6a43c7d24f6a28bba8ee60dcd6a Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Tue, 11 Nov 2025 23:01:51 +0400 Subject: [PATCH 09/10] chore: Add memory plugin to dload.xml --- tests/acceptance/dload.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/acceptance/dload.xml b/tests/acceptance/dload.xml index 29da15fa..da8f319d 100644 --- a/tests/acceptance/dload.xml +++ b/tests/acceptance/dload.xml @@ -13,6 +13,7 @@ + From 2dd5bde5acd3738ea63dd6e060c7a36f78b26820 Mon Sep 17 00:00:00 2001 From: roxblnfk Date: Tue, 11 Nov 2025 23:35:04 +0400 Subject: [PATCH 10/10] docs: Add README for acceptance tests setup and usage --- tests/acceptance/README.md | 41 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 tests/acceptance/README.md diff --git a/tests/acceptance/README.md b/tests/acceptance/README.md new file mode 100644 index 00000000..90abc170 --- /dev/null +++ b/tests/acceptance/README.md @@ -0,0 +1,41 @@ +## Acceptance Tests + +This directory contains acceptance tests to verify the functionality of RoadRunner and PHP SDK integration with Temporal server. +The PHP SDK is included as a submodule in this repository. + +### Setup + +To run the PHP SDK, you need to install Composer dependencies: + +```bash +cd tests/acceptance/php-sdk +composer update +``` + +Next, you need to download the Temporal Dev Server and Temporal Test Server. +This is done using the DLoad utility, which comes bundled with the PHP SDK. +DLoad automatically fetches the correct binary versions from the configuration, which is especially useful since different PHP SDK branches may require different Temporal server versions (including pre-release builds with experimental features). + +Download the binaries with: + +```bash +cd tests/acceptance/php-sdk +vendor/bin/dload get temporal temporal-tests-server +``` + +To build RoadRunner with the Temporal plugin, we also use DLoad. It fetches the plugin version numbers from build.roadrunner.dev, generates the Velox configuration, and runs Velox to build RoadRunner with the current codebase. + +```bash +cd tests/acceptance +php-sdk/vendor/bin/dload build +``` + +### Running Tests + +Navigate to the php-sdk directory and run the Acceptance or Functional tests using Composer: + +```bash +cd tests/acceptance/php-sdk +composer test:acc +composer test:func +``` \ No newline at end of file