Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pre-commit failing in Github Actions within setup.cfg file #112

Closed
vatanaksoytezer opened this issue Jun 23, 2021 · 5 comments
Closed

pre-commit failing in Github Actions within setup.cfg file #112

vatanaksoytezer opened this issue Jun 23, 2021 · 5 comments

Comments

@vatanaksoytezer
Copy link

We are happily using pre-commit all over ros-planning repos for some time. Today @JafarAbdi and I got a failing pre-commit CI when we've added a setup.cfg file to one of our repos. The error we are getting from Github Actions is:

Error: Unable to locate executable file: pre-commit. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.

I've tracked this to a one single line in my own fork here vatanaksoytezer/srdfdom#3. pre-commit CI passes before that particular line but starts to fail with the error above. For more information:

Last passing CI: https://github.com/vatanaksoytezer/srdfdom/actions/runs/965983045
Failing CI: https://github.com/vatanaksoytezer/srdfdom/pull/3/checks?check_run_id=2899733955

I appreciate if you have any insights / thoughts on this.

@asottile
Copy link
Member

I'd recommend not using install-scripts -- it's not doing what you intend it to do and breaking how pip works

note that https://pre-commit.ci will not have this problem as it does not install using your repository so I'd recommend using that instead

@vatanaksoytezer
Copy link
Author

vatanaksoytezer commented Jun 23, 2021

Follow up question: Just tried https://pre-commit.ci but I couldn't seem to run the CI on different branches other than my main branch? Am I missing something?

@asottile
Copy link
Member

it runs on pull requests and the default branch

@vatanaksoytezer
Copy link
Author

Is there any way we can run it on other branches as well? I am also happy to contribute these stuff. We (and many other ROS organizations) typically support multiple ROS distributions on different branches in our repos and run CIs against each branch.

@asottile
Copy link
Member

not currently besides having it in PRs to those branches

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants