Repository navigation
Add parameterised Nextcloud PHPUnit test image, GHCR publish workflow, and docs - #1
Merged
Merged
Conversation
Co-authored-by: charabaruk <130681+charabaruk@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Set up Docker test images for Nextcloud apps
Add parameterised Nextcloud PHPUnit test image, GHCR publish workflow, and docs
Oct 2, 2026
charabaruk
reviewed
Oct 2, 2026
| @@ -0,0 +1,23 @@ | |||
| MIT License | |||
|
|
|||
| Copyright (c) 2026 charabaruk | |||
Owner
There was a problem hiding this comment.
Full name should be used, not GitHub user name: "Chris Charabaruk"
Contributor
Author
There was a problem hiding this comment.
Changed to "Chris Charabaruk" in LICENSE.
Owner
|
@copilot resolve failures for versions 24 through 27 and address review comments. |
…full name in LICENSE Co-authored-by: charabaruk <130681+charabaruk@users.noreply.github.com>
…uite Co-authored-by: charabaruk <130681+charabaruk@users.noreply.github.com>
charabaruk
approved these changes
Oct 2, 2026
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.
This repo had no image build, so this PR adds one. It builds
ghcr.io/charabaruk/nextcloud-docker-testing:stable24–stable31. Each tag contains the matchingnextcloud/serversource,tests/bootstrap.phpand composer dev dependencies. This letsdocker compose run app phpunit --bootstrap tests/bootstrap.php apps/<app>/tests/.work with an app mounted underapps/.Only a local
stable30build was attempted. It got through the base image, apt packages and the server clone, then failed atcomposer installbecause the sandbox blocks GitHub downloads. Nothing else has been built or run, so the first CI run needs to confirm it, including 24–29 and 31.Dockerfile
DockerfilewithARG NEXTCLOUD_VERSION, based onnextcloud:${NEXTCLOUD_VERSION}. It uses the base image's PHP and its bundled extensions, so there is no per-version package branching./var/www/htmlwithgit clone --depth=1 --branch stableN --recurse-submodules --shallow-submodules.composer:2if it's missing, then runscomposer installwith dev dependencies.vendor-bin/phpunit. The Dockerfile also installs there if that directory exists, symlinksphpunitinto/usr/local/bin, and fails the build if no binary is found.memory_limit=2048Minzz-memory-limit.iniso it overrides the base image's setting.www-dataand moves Apache to port 8080, since a non-root user can't bind port 80.Entrypoint (
setup.sh,cmd.sh)setup.shrunsocc maintenance:installwith SQLite ifocc statusdoesn't report installed. The admin defaults toadmin/adminand can be set withNEXTCLOUD_ADMIN_USERandNEXTCLOUD_ADMIN_PASSWORD.apps/that hasappinfo/info.xmland isn't in/opt/bundled-apps.txt. That file is a list of the server's apps captured at build time, so only mounted apps are enabled. It then runsexec "$@".www-data.cmd.shis the defaultCMDand starts Apache in the foreground.CI (
.github/workflows/docker-publish.yml)workflow_dispatch, andpull_request. Pull requests build only.fail-fast: false, buildx, a GHA layer cache per version, andcontents: read/packages: writepermissions.phpunit --version.occ statusreportsinstalled: true.smoke/SmokeTest.php, runs throughtests/bootstrap.php.stableNandstableN-<short-sha>, reusing the layer cache from the local build.Docs
README.mdcovers tags,docker runand compose usage matching the consumer contract, how to add a version, and how to make the GHCR package public.LICENSEis MIT and states the code was written from scratch.Review notes
checkout@v4,setup-buildx@v3,login@v3,build-push@v6) should be checked against the latest majors.Original prompt