Repository navigation
Stop skipping ImageMagick tests in CI - #92
Merged
Merged
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The policy premise test can still pass vacuously when neither ImageMagick command is installed.
Review effort: Balanced
Findings: 1
What changed in this PR
Adds ImageMagick 6 compatibility so Active Storage image tests run in Ubuntu CI instead of skipping.
[!TIP]
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or rungh pr ready --undo.
Click "Ready for review" or rungh pr readyto reengage.
Changes:
- Selects
magick identifyor standaloneidentifybased on availability. - Applies the selected command to image inspection and policy tests.
| File | Description |
|---|---|
activestorage-hotcell-server/test/test_helper.rb |
Adds compatible image identification. |
activestorage-hotcell-server/test/previewers_test.rb |
Uses compatible identification for brightness checks. |
activestorage-hotcell-server/test/magick_environment_test.rb |
Updates environment and resource tests. |
activestorage-hotcell-client/test/test_helper.rb |
Adds compatible client-suite image identification. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
CI's `activestorage` job installs Ubuntu's `imagemagick` package, which is ImageMagick 6 and has no `magick` command. Every activestorage test that shelled out to `magick` skipped there: 24 in the server suite and 9 in the client. Call `identify` when `magick` is missing.
flavorjones
force-pushed
the
card-578-identify-fallback
branch
from
October 1, 2026 21:01
d75c289 to
d3df7ac
Compare
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.

Motivation
The
activestorageCI job installs Ubuntu'simagemagickpackage (ci.yml#L116), which is ImageMagick 6 and has nomagickcommand. The test helpers shell out tomagick identifyto read back the images a cell writes, and skip when it prints nothing (test_helper.rb#L54-L55). So CI skipped 24 tests in the server suite and 9 in the client, all of which run on ImageMagick 7.test_the_policy_does_refuse_a_magick_that_reads_italso passed vacuously in CI:systemreturnednilfor the missingmagick, andrefute nilpasses.Details
Each test class's
IDENTIFYismagick identifywhenmagick -versionsucceeds andidentifyotherwise. Theidentifyandbrightnesshelpers,magick_installed?,magick_thread_resourceand the policy premise test all use it.