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

Run Unmarked Test pre-commit only if all other hooks pass #1338

Merged
merged 5 commits into from
Oct 31, 2024

Conversation

dpanici
Copy link
Collaborator

@dpanici dpanici commented Oct 30, 2024

the unmarked test pre-commit hook (at least on my laptop) can take anywhere from 5-10 seconds to run, so I'd rather it only run if everything else is passing.

@@ -3,6 +3,7 @@ repos:
rev: 24.3.0
hooks:
- id: black-jupyter
log_file: devtools/pre-commit.log
Copy link
Collaborator Author

@dpanici dpanici Oct 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logs are created only when a pre-commit hook fails

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if it fails on the first pass, the run again does it delete the old log file? or does it just overwrite it with a blank one?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the last one deletes it at the end of each run.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yea it makes sure its deleted after every run

@dpanici dpanici marked this pull request as draft October 30, 2024 18:44
@dpanici dpanici marked this pull request as ready for review October 30, 2024 18:52
@dpanici dpanici requested review from a team, rahulgaur104, f0uriest, ddudt, kianorr, sinaatalay, unalmis and YigitElma and removed request for a team October 30, 2024 18:52
@YigitElma YigitElma added the override codecov Override codecov label Oct 30, 2024
YigitElma
YigitElma previously approved these changes Oct 30, 2024
Co-authored-by: Yigit Gunsur Elmacioglu <[email protected]>
@YigitElma YigitElma changed the title Only run Unmarked Test pre-commit if all other hooks pass Run Unmarked Test pre-commit only if all other hooks pass Oct 31, 2024
@dpanici dpanici merged commit 56a4db9 into master Oct 31, 2024
22 checks passed
@dpanici dpanici deleted the dp/pre-commit branch October 31, 2024 04:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
override codecov Override codecov
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants