chore(ci): add PHP unit tests with Ceph S3#714
Open
DeepDiver1975 wants to merge 2 commits into
Open
Conversation
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>
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-workflowsphp-unit.yml, but that reusable workflow does not support ceph. This PR adds ceph coverage via a local.github/workflows/php-unit.ymlcallable workflow plus aphp-unit-cephjob inmain.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-e.NETWORK_AUTO_DETECT,RGW_NAME,CEPH_DEMO_*were previously set as step shell env but never passed intodocker run, so the container aborted withERROR- CEPH_PUBLIC_NETWORK must be defined.RGW_CIVETWEB_PORT=8080(the variable the image actually reads;CEPH_DEMO_RGW_PORTis ignored) so radosgw's civetweb frontend binds 8080, matching theceph.config.phpendpoint.OWNCLOUDbucket (uppercase) thatceph.config.phppoints at — RGW bucket names are case-sensitive.ceph.config.phpendpoint updatedhttp://ceph:80/→http://localhost:8080/for the host-networked GitHub Actions runner. The core-checkoutrefalso uses the standard&&/||expression instead of the invalidcase()function.🤖 Generated with Claude Code