You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add a Caller Hook That Runs Before the .NET Unit Tests in validate-task #4265
A .NET caller of validate-task.yml has no supported way to install system tools on the unit-test runner before its .NET tests run. Tests that shell out to a system tool, such as exiftool or ffmpeg, therefore skip or fail in CI.
Read at hub main (release 2.0.1492), job unit-test:
Run unit tests step (the .NET tests) runs right after Setup .NET SDK step and Resolve .NET workspaces step. No caller-supplied step runs before it.
Run caller install-test-deps hook runs after the .NET tests and the Codecov upload, and only when a Python project is present and a test-matrix leg is set. A .NET-only caller never reaches it, and when it does run it is too late for the .NET tests.
The .github/actions/validate hook runs in the separate validate job, on a different runner.
Downstream case
ptr727/PhotoCleaner#277: the media tests need exiftool and ffmpeg. On the CI runner they skip through a shared fixture, so a large share of the suite never runs in CI. The maintainer chose to install the tools for the existing test job rather than add a separate repo-local job.
Proposal
Add a caller pre-test hook that runs before Setup .NET SDK step whenever **/*Tests*.csproj exists, for example an optional .github/actions/install-test-deps call (or a new .github/actions/pre-test hook) gated on the file existing. That makes it opt-in, with no effect on a caller that has no such hook. The caller would then bump its pin and add the hook action.
Activity
Add a Caller pre-test Hook That Runs Before the .NET Unit Tests (#4269)