Skip to content

CI: Add Modules Testing#173

Open
edlng wants to merge 1 commit intovalkey-io:mainfrom
edlng:edlng/valkey-search-ci
Open

CI: Add Modules Testing#173
edlng wants to merge 1 commit intovalkey-io:mainfrom
edlng:edlng/valkey-search-ci

Conversation

@edlng
Copy link
Copy Markdown
Collaborator

@edlng edlng commented Mar 24, 2026

ci(php): add Docker-based CI for Valkey Search module testing

Summary

Adds a reusable GitHub Actions composite action (start-valkey-docker) that spins up standalone, cluster, and auth-protected Valkey servers using Docker with the valkey-bundle image (which includes the Search module). Updates the CI workflows to use Docker containers for Valkey 9.0 on Ubuntu, falling back to native server startup for other versions/platforms.

This is independent of the search command PRs and can be merged separately.

Issue link

Closes #165

Features / Behaviour Changes

  • New .github/workflows/start-valkey-docker/action.yml composite action
    • Pulls valkey/valkey-bundle:9.1-rc1 (pinned until stable 9.x images ship)
    • Starts standalone (6379-6381 with replication), cluster (7001-7006), and auth cluster (5001-5006)
    • Sets up TLS servers when valkey-server is available on the host
    • Falls back to native startup when Docker isn't available (macOS)
    • Extracts valkey-cli from the image for cluster creation and health checks
  • Updated php.yml to use Docker for 9.0+ubuntu, native for everything else
  • Updated test-pecl-package and test-pie.yml to use the new action
  • Cleaned up server stop steps to handle both Docker containers and native processes
  • Removed stale debug logging from run-php-tests

Implementation

The action checks Docker availability first, then either pulls the bundle image and starts containers with --network host, or falls back to the existing shell scripts. TLS setup always uses the host valkey-server binary (built from source by install-engine) since the Alpine binary from the Docker image may not work on Ubuntu.

Limitations

  • Image is pinned to valkey-bundle:9.1-rc1. Needs updating when stable 9.x images are published.
  • TLS setup depends on valkey-server being available on the host. So, these tests use the built-from-source server.

Testing

Tested in CI across the matrix (Ubuntu + macOS, multiple engine versions, PHP 8.2/8.3). Docker path runs on Ubuntu with 9.0, native path runs everywhere else.

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one issue.
  • Commit message has a detailed description of what changed and why.
  • Tests are added or updated.
  • CHANGELOG.md and documentation files are updated.
  • Destination branch is correct - main or release
  • Create merge commit if merging release branch into main, squash otherwise.

Signed-off-by: Edward Liang <edward.liang@improving.com>
@edlng edlng marked this pull request as ready for review March 25, 2026 15:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

(CI): Change Valkey-Server to load modules in CI

1 participant