Skip to content

chore(ci): add PHP unit tests with Ceph S3#714

Open
DeepDiver1975 wants to merge 2 commits into
masterfrom
ci/php-unit-ceph
Open

chore(ci): add PHP unit tests with Ceph S3#714
DeepDiver1975 wants to merge 2 commits into
masterfrom
ci/php-unit-ceph

Conversation

@DeepDiver1975

Copy link
Copy Markdown
Member

Summary

Adds a Ceph S3 PHP-unit CI job to complement the Scality jobs that #706 already merged.

#706 wired scality unit tests through the shared owncloud/reusable-workflows php-unit.yml, but that reusable workflow does not support ceph. This PR adds ceph coverage via a local .github/workflows/php-unit.yml callable workflow plus a php-unit-ceph job in main.yml. Scality keeps using the reusable workflow untouched.

This supersedes the ceph portion of #704 (which was based on the pre-#706 local-workflow approach and is now obsolete). #704 has been left at its original state.

Ceph setup — verified end-to-end against owncloudci/ceph:tag-build-master-jewel-ubuntu-16.04

  1. Forward container env with -e. NETWORK_AUTO_DETECT, RGW_NAME, CEPH_DEMO_* were previously set as step shell env but never passed into docker run, so the container aborted with ERROR- CEPH_PUBLIC_NETWORK must be defined.
  2. Use RGW_CIVETWEB_PORT=8080 (the variable the image actually reads; CEPH_DEMO_RGW_PORT is ignored) so radosgw's civetweb frontend binds 8080, matching the ceph.config.php endpoint.
  3. Create the OWNCLOUD bucket (uppercase) that ceph.config.php points at — RGW bucket names are case-sensitive.

ceph.config.php endpoint updated http://ceph:80/http://localhost:8080/ for the host-networked GitHub Actions runner. The core-checkout ref also uses the standard &&/|| expression instead of the invalid case() function.

🤖 Generated with Claude Code

Master (#706) added scality unit-test jobs via the shared
owncloud/reusable-workflows php-unit workflow, but that workflow does
not support ceph. Add ceph coverage with a local php-unit.yml callable
workflow and a php-unit-ceph job in main.yml; scality keeps using the
reusable workflow.

The ceph setup is verified end-to-end against
owncloudci/ceph:tag-build-master-jewel-ubuntu-16.04:

- Forward the container env (NETWORK_AUTO_DETECT, RGW_NAME, CEPH_DEMO_*)
  into `docker run` with `-e`; otherwise the container aborts with
  "ERROR- CEPH_PUBLIC_NETWORK must be defined".
- Use RGW_CIVETWEB_PORT=8080 (the variable the image reads) so radosgw's
  civetweb frontend binds 8080, matching the ceph.config.php endpoint.
  CEPH_DEMO_RGW_PORT is ignored by the image.
- Create the "OWNCLOUD" bucket (uppercase) that ceph.config.php points
  at; RGW bucket names are case-sensitive.

ceph.config.php endpoint is updated from http://ceph:80/ to
http://localhost:8080/ for the host-networked GitHub Actions runner.

The core-checkout ref also uses the standard `&&`/`||` expression
instead of the invalid `case()` function.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
@DeepDiver1975 DeepDiver1975 requested a review from a team as a code owner July 15, 2026 22:07
The Ceph and Scality S3 servers are started detached with `docker run -d`
but nothing waited for them to accept connections before the tests used
them. The Ceph jewel demo image takes longer than ~20s to bootstrap its
RADOS gateway (civetweb on port 8080), so `s3:create-bucket` raced ahead
and failed with `cURL error 7: Failed to connect to localhost port 8080`.
All four Ceph matrix jobs failed this way while the faster-booting Scality
jobs passed by luck.

Add a TCP readiness poll after each server launch, mirroring the old
Drone CI `wait-for-it ceph:80` / `scality:8000` steps.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Thomas Müller <1005065+DeepDiver1975@users.noreply.github.com>
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.

1 participant