Black: GitHub Actions failing on Set up job

Created on 25 Jun 2020  路  4Comments  路  Source: psf/black

Describe the bug A clear and concise description of what the bug is.

Current runner version: '2.263.0'
Operating System
Virtual Environment
Prepare workflow directory
Prepare all required actions
Download action repository 'actions/checkout@v2'
Download action repository 'actions/setup-python@v2'
Download action repository 'psf/black@stable'
##[error]Could not find file '/home/runner/work/_actions/_temp_de4a08b8-11ef-4721-98cf-38e040384849/_staging/psf-black-6bedb5c/docs/show_your_style.md'.

To Reproduce Steps to reproduce the behavior:

Follow instructions in README.md file regarding GitHub Actions.

Expected behavior A clear and concise description of what you expected to happen.

Expected to run black in CI/CD pipeline.

Environment (please complete the following information):

  • Version: psf/black@stable
  • OS and Python version: ubuntu-latest

Does this bug also happen on master? To answer this, you have two options:

Yes.

Additional context Add any other context about the problem here.

Source: https://github.com/ngxtop/ngxtop/blob/master/.github/workflows/black.yml

bug integrations

Most helpful comment

Yeah, sorry about that. Since the newest stable release, we restructured the documentation and turned the modules into packages which probably messed up with the paths. So for now, the GitHub Action will not work until we release a new version. I can't give you a date, but hopefully soon we'll have a new release!

Once again, sorry for the inconvenience. If you have questions related to this, please ask away. For other questions not related to this, Black now has a IRC channel! It's #blackformatter on Freenode. shameless promotion :)

All 4 comments

Yeah, sorry about that. Since the newest stable release, we restructured the documentation and turned the modules into packages which probably messed up with the paths. So for now, the GitHub Action will not work until we release a new version. I can't give you a date, but hopefully soon we'll have a new release!

Once again, sorry for the inconvenience. If you have questions related to this, please ask away. For other questions not related to this, Black now has a IRC channel! It's #blackformatter on Freenode. shameless promotion :)

Would it work by pointing the action to master instead of stable, or a recent commit?

Yes it does work on master, I just assumed that running on master wasn't advisable. https://github.com/ichard26/testblackaction/runs/808117249?check_suite_focus=true

And if you want the newest commit that works: psf/black@fcf97961061982656a1384ecc1628e217a52a88c
https://github.com/ichard26/testblackaction/runs/808154341 (don't mind the Black run failure, I purposefully committed a poorly formatted document)

The GitHub Action for Black (courtesy of @WhyNotHugo, thanks!) now works as a new release has been made. I was actually wrong about why the action was failing to setup. For some reason there were broken symlinks in the repository and they made the workers very confused when they tried to resolve the symlinks.

Here's an example of a failed run (due to poorly formatted code):
https://github.com/ichard26/testblackaction/runs/1146381710?check_suite_focus=true

and here's an example of a successful run:
https://github.com/ichard26/testblackaction/runs/1146391332?check_suite_focus=true

If you have any more issues or questions, please open a new issue or talk to some Black folks in #blackformatter IRC channel on Freenode (although admittedly it is only cooperlees, me and a lurker who's in there :upside_down_face: ).

Was this page helpful?
0 / 5 - 0 ratings