-
Notifications
You must be signed in to change notification settings - Fork 2
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
Try to fix pre-commit failure #35
Conversation
Quality Gate passedIssues Measures |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #35 +/- ##
=======================================
Coverage 77.84% 77.84%
=======================================
Files 7 7
Lines 176 176
=======================================
Hits 137 137
Misses 39 39 ☔ View full report in Codecov by Sentry. |
It's very curious when running pre-commit job regular fails (it can be passed after I clicked Re-run all jobs), I tried to make changes in this PR to fix it, I know it's not a valid revision, but pre-commit job passed. After I merged it into the @2bndy5 Do you know what causes it failed? |
Looks like you're running pytest as a pre-commit hook. I don't think its a good idea to run unit testing in a reusable workflow... Looking at the logs you linked to, I see the test hook failed.
More specifically, the test hook failed to build a wheel for
It looks like I would suggest you remove the unit testing from pre-commit-config.yml. |
I tried to separate the pre-commit job into a single workflow to avoid running the pre-commit local hook and run pytest in the same environment, but no luck. CI passed in PR #36, but after merge CI failed again. Finally, with your suggestion, I removed the local hook from pre-commit-config.yaml 59d68a1, and the pre-commit job is back to normal. |
The problem might have something to do with the reusable workflow's cache. Still it is better to have unit tests run separate from pre-commit hooks. There's probably a reason that pytest doesn't have their own pre-commit hook. And the coverage tool automatically adds the working directory to python path. So, there shouldn't be any need to install cpp-linter-hook when using |
No description provided.