black icon indicating copy to clipboard operation
black copied to clipboard

Using version specifier in GitHub Action fails

Open lofidevops opened this issue 1 year ago • 1 comments

Describe the bug

Using version specifier in GitHub Action fails. I believe this is because the stable branch has not been updated.

To Reproduce

Add the following GitHub Action to your repo:

name: Lint

on: [push, pull_request]

jobs:
  lint:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: psf/black@stable
        with:
          options: "--check --verbose --skip-magic-trailing-comma"
          version: "~= 22.0"

The resulting error is:

ERROR: Invalid requirement: 'black[colorama]==~= 22.0'

Error: Failed to install Black.
Error: Process completed with exit code 1.

See https://github.com/canonical-ols/acceptable/actions/runs/3206267998/jobs/5239812322 for an example. (I'm not sure if the logs are visible to everyone?)

Expected behavior

Black 22.x should install as expected. Linter should run.

Environment

GitHub Action. See action file above.

Additional notes

I noticed that although 22.10.0 has been released, https://github.com/psf/black/tree/stable has not been updated.

lofidevops avatar Oct 07 '22 16:10 lofidevops

I just updated the stable branch. I thought that was supposed to be automated, so leaving this open to figure out why the automation isn't working.

JelleZijlstra avatar Oct 07 '22 17:10 JelleZijlstra

The automation failed because the mypyc wheels jobs blew up due to packaging and hatchling shenanigans. I don't think there's anything actionable here anymore.

Thanks for reporting!

ichard26 avatar Feb 01 '23 04:02 ichard26