Repository navigation
Add image format tests for GD, Imagick and vips - #43
Merged
Merged
Conversation
Add a test script which checks that GD, Imagick and vips can read, manipulate and write JPEG, PNG, GIF, WebP, AVIF and HEIC images inside the built image. It also covers reading SVG, TIFF and the first page of a PDF, and makes sure that transparency and the frames of an animated GIF survive a resize and a write. A library without an API for a format is reported as skipped. Any other failure, or a format which no library can read or write, fails the run. A new GitHub Actions workflow builds the image for every supported PHP version on each push and pull request and runs the script in it. The results are added to the job summary and the generated images are uploaded as a build artifact. The base image is pulled from Docker Hub, so the build also works for forks without registry credentials. The script and its fixtures are a copy of the ones in docker-php. Unlike there, Imagick is expected to read PDF, because this image installs Ghostscript.
Member
Author
|
Failures to be expected – the base needs flownative/docker-php#68 to be merged and released. |
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.
Add a test script which checks that GD, Imagick and vips can read, manipulate and write JPEG, PNG, GIF, WebP, AVIF and HEIC images inside the built image. It also covers reading SVG, TIFF and the first page of a PDF, and makes sure that transparency and the frames of an animated GIF survive a resize and a write.
A library without an API for a format is reported as skipped. Any other failure, or a format which no library can read or write, fails the run.
A new GitHub Actions workflow builds the image for every supported PHP version on each push and pull request and runs the script in it. The results are added to the job summary and the generated images are uploaded as a build artifact. The base image is pulled from Docker Hub, so the build also works for forks without registry credentials.
The script and its fixtures are a copy of the ones in docker-php. Unlike there, Imagick is expected to read PDF, because this image installs Ghostscript.