Skip to content

Install ExifTool and FFmpeg for CI Unit Tests via the Pre-Test Hook - #290

Merged
ptr727 merged 1 commit into
developfrom
ci/media-tools-pre-test-hook
Nov 18, 2026
Merged

ptr727 merged 1 commit into
developfrom
ci/media-tools-pre-test-hook

Conversation

@ptr727

@ptr727 ptr727 commented Nov 18, 2026 •

Copy link
Copy Markdown
Owner

Summary

The CI unit-test job had neither exiftool nor ffmpeg, so the tests that need them skipped through the shared media fixture. This adds the hub's opt-in pre-test hook, which installs both tools before the .NET tests run.

  • Add .github/actions/pre-test/action.yml, a composite action with no inputs or outputs. It installs libimage-exiftool-perl and ffmpeg from apt and prints each tool's version.
  • Move every hub reusable-workflow pin from 2.0.1473 to 2.0.1495 (a1fa51ccced11f464ec4d4bd2b14533293405932), the release that ships the hook. Between the two tags, validate-task.yml is the only workflow this repository calls that changed. It gains the pre-test step and an optional test-matrix-file input, and no required input.
  • Correct OPERATIONS.md "Local Verification", which said CI never runs against a real exiftool/ffmpeg install.

Closes on promotion: #277

Verification

  • check-jsonschema --builtin-schema vendor.github-actions passes on the new action, and shellcheck passes on its run: body.
  • actionlint 1.7.7 is clean over the workflows.
  • Local dotnet test with both tools installed: 433 total, 426 passed, 7 skipped.
  • The CI unit-test log is read after this pull request's run to confirm the hook ran and the media tests no longer skip.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Chores
    • Updated automated test and release workflows and their shared workflow versions. Test setup now installs ExifTool and FFmpeg and reports their versions.
  • Documentation
    • Clarified that CI does not test against a real media library or live Immich server; those integration checks are performed manually.

The CI runner has neither tool, so the media tests skip there. Add the
hub's opt-in pre-test hook, which each .NET unit-test leg runs before the
SDK setup, and install both tools from apt in it.

The hook ships in hub release 2.0.1495, so every hub pin moves from
2.0.1473 to that release in lockstep. Between the two tags only
validate-task.yml changed among the tasks this repository calls, and it
adds no required input.

OPERATIONS.md no longer says CI never runs against a real exiftool or
ffmpeg install.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Copilot AI lite review requested due to automatic review settings November 18, 2026 23:33
@ptr727

ptr727 commented Nov 18, 2026

Copy link
Copy Markdown
Owner Author

A recorded local strict-review pass covers head 6fad0abeded77ee5ad091acaf81173ad7aa2f174, the content this pull request carries at that commit against develop, and it recorded 0 findings.

@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The PR adds a composite pre-test action that installs ExifTool and FFmpeg, updates reusable workflow references to version 2.0.1495, and revises local verification guidance.

Changes: CI Tooling and Workflow Updates

Layer / File(s) Summary
Pre-test tools and verification guidance
.github/actions/pre-test/action.yml, OPERATIONS.md
The composite action installs ExifTool and FFmpeg and prints their versions. The verification guidance distinguishes CI unit tests from local manual checks against real media and a live Immich server.
Reusable workflow revisions
.github/workflows/merge-bot-pull-request.yml, .github/workflows/publish-release.yml, .github/workflows/test-pull-request.yml
The reusable workflow references advance from version 2.0.1473 to version 2.0.1495.

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Other · Severity of issue fixed: Low

Possibly related issues

  • Issue 277 describes CI tests skipping when ExifTool and FFmpeg are unavailable. This PR adds a pre-test action that installs both tools.

Possibly related PRs

  • ptr727/PhotoCleaner#270: This PR updates the same reusable workflow pins and caller workflows, including test-pull-request.yml.
Merge Risk: Minimal · up to 6fad0

The change installs ExifTool and FFmpeg before unit tests, bumps the reusable workflow pins, and corrects the verification docs. It affects CI only, is easily reversible, and shows no concrete merge risk.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: the new pre-test hook installs ExifTool and FFmpeg so the .NET unit tests that need them run instead of skipping. The composite action in .github/actions/pre-test/acti…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: the new pre-test hook installs ExifTool and FFmpeg so the .NET unit tests that need them run instead of skipping. The composite action in .github/actions/pre-test/action.yml installs libimage-exiftool-perl and ffmpeg via apt, and the workflow pins move to reusable-workflow 2.0.1495, which ships the hook. The title is specific and matches the changeset.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 3731ff9 and 6fad0ab.

Files selected for processing: 5

  • .github/actions/pre-test/action.yml
  • .github/workflows/merge-bot-pull-request.yml
  • .github/workflows/publish-release.yml
  • .github/workflows/test-pull-request.yml
  • OPERATIONS.md

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

@codecov

codecov Bot commented Nov 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 76.91%. Comparing base (3731ff9) to head (6fad0ab).

Additional details and impacted files
@@             Coverage Diff              @@
##           develop     #290       +/-   ##
============================================
+ Coverage    41.73%   76.91%   +35.18%     
============================================
  Files           27       27               
  Lines         4445     4445               
  Branches       390      390               
============================================
+ Hits          1855     3419     +1564     
+ Misses        2520      910     -1610     
- Partials        70      116       +46     
Flag Coverage Δ
dotnet 76.91% <ø> (+35.18%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Static review cannot verify that the pinned workflow invokes the apt-based hook successfully on a live runner or that the media tests actually execute, so the post-change CI log is required.

No open issues 🎉

What changed in this PR

This pull request enables CI unit tests to exercise media-dependent behavior by installing ExifTool and FFmpeg through a pre-test hook, updates reusable workflow pins, and corrects the local verification documentation.

Changes:

  • Add a composite pre-test action that installs and reports ExifTool and FFmpeg.
  • Update reusable workflow pins to version 2.0.1495.
  • Document the revised CI media-tool setup in OPERATIONS.md.
File Description
OPERATIONS.md Updates local verification documentation to describe CI installation and use of ExifTool and FFmpeg.
.github/​workflows/​test-pull-request.yml Updates validation and smoke-build reusable workflow pins.
.github/​workflows/​publish-release.yml Updates reusable workflow pins used by the release workflow chain.
.github/​workflows/​merge-bot-pull-request.yml Updates the merge-bot reusable workflow pin.
.github/​actions/​pre-test/​action.yml Adds a composite pre-test action that installs ExifTool and FFmpeg before .NET tests run.

Review effort: Lite

@ptr727

ptr727 commented Nov 18, 2026

Copy link
Copy Markdown
Owner Author

Answer to the verdict headline on the review round covering 6fad0abe, (1) item:

  1. Verdict headline, "Static review cannot verify that the pinned workflow invokes the apt-based hook successfully on a live runner or that the media tests actually execute, so the post-change CI log is required."
    No change needed. The CI log on this head answers it. Unit test job (Python 3.13) shows:

    • Run ./.github/actions/pre-test, then the Install ExifTool and FFmpeg step, before Setup .NET SDK step.
    • Setting up libimage-exiftool-perl (13.50+dfsg-1) and Setting up ffmpeg (7:8.0.1-3ubuntu2).
    • exiftool version 13.50 and ffmpeg version 8.0.1-3ubuntu2.
    • Test run summary: Passed!, total 433, failed 0, succeeded 426, skipped 7.

    The issue's baseline with no tools was 104 skipped. The 7 left are the Immich-image and file-permission cases, which do not depend on either tool. A local run with both tools installed gives the same 426 passed and 7 skipped.

@ptr727

ptr727 commented Nov 18, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

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.

2 participants