mypy-check icon indicating copy to clipboard operation
mypy-check copied to clipboard

[Feature Request] macOS Support

Open leycec opened this issue 1 year ago • 3 comments

So... This action is really great under both Linux and Windows runners – but doesn't appear to support macOS. Sadness erupts like candy out a Halloween pumpkin.

This seems to be happening due to this action internally requiring Docker. Microsoft themselves were unable to convince Docker to extend licensing support for Docker Enterprise to macOS. Ergo, Docker is unavailable under macOS runners. If that isn't business madness, I don't know what is.

It's Been a Rough Saturday Night

I hit this issue just tonight for @beartype, a near-real-time runtime type-checker I maintain for fun and QA. Our GitHub Actions test workflow exercises @beartype against Linux, macOS, and Windows via the standard one-liner:

        platform: [ubuntu-latest, windows-latest, macos-latest]

So far, so good. This action mostly behaved as expected under Linux and Windows but then inexplicably failed under macOS with non-human-readable exceptions resembling:

/Users/runner/work/_temp/f61a2437-0d71-496a-ad50-79d503816400.sh:
    line 1: docker: command not found
Error: Process completed with exit code 127.

It took me what felt like a literal eternity to realize that macOS runners fail to ship Docker due to a petty licensing dispute on Docker's part. That same thread has what appears to be a non-working workaround using Homebrew as well as unsubstantiated advice to switch to the open-source Docker alternative podman. Frankly, I suspect nothing works.

At the moment, I've reluctantly disabled this action entirely in our workflow. That's clearly non-ideal. Surely something clever can be done! Sadly, I am not clever.

I'm really not as conversant in GitHub Actions as I'd like to be. Is there some easy way for macOS-friendly workflows like ours to just conditionally skip this action under macOS? Alternately, is there some easy way for this action to begin supporting macOS?

I assume not, because Docker gonna Docker. This is why I use sad cat emojis. :crying_cat_face:

But this Action Still Rocks!

@beartype is currently just using @jakebailey's excellent pyright-action action to statically type-check. That's fine for now, but we'd really love to also statically type-check against mypy at some point.

Until then, thanks so much for maintaining this extraordinary action on behalf of the whole typing community. You're amazing, @jpetrucciani.

leycec avatar Oct 09 '22 05:10 leycec