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

ci(pre-push hook): automate loading pre-push hook with cargo-husky #274

Merged
merged 1 commit into from
Jun 24, 2023

Conversation

SLASHLogin
Copy link
Contributor

Add cargo-husky to dev-deps, create hook, update CONTRIBUTING.md

#214

@codecov
Copy link

codecov bot commented Jun 23, 2023

Codecov Report

Merging #274 (2e40188) into main (b808305) will not change coverage.
The diff coverage is n/a.

❗ Current head 2e40188 differs from pull request most recent head 5506c9d. Consider uploading reports for the commit 5506c9d to get more accurate results

@@           Coverage Diff           @@
##             main     #274   +/-   ##
=======================================
  Coverage   82.50%   82.50%           
=======================================
  Files          36       36           
  Lines        7301     7301           
=======================================
  Hits         6024     6024           
  Misses       1277     1277           

Copy link
Member

@mindoodoo mindoodoo left a comment

Choose a reason for hiding this comment

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

Awesome stuff, thanks !

@SLASHLogin
Copy link
Contributor Author

SLASHLogin commented Jun 23, 2023

Please, do not merge this just yet. I think rusty-hooks might be a better choice for this task, as the developer behind it seems to be more known in the rust community. Even though both crates didn't receive much attention recently, I think there's just a bigger possibility that rusty-hook's maintainer would at least respond. I'd like to test how it behaves on my branch with CI first, tho.

After tinkering with it for a while, I don't think it works, as good as I expected. It has problems with detecting the presence of cargo-make. I think we can stick with cargo-husky for now.

Cargo.toml Outdated Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
@joshka
Copy link
Member

joshka commented Jun 23, 2023

I squashed the commits and added the following changes to this:

  • used the one line suggestion in the cargo toml
  • changed this so it prints a message rather than installing cargo-make as we shouldn't generally force installation of tools on people's machines.

Fixes ratatui-org#214
- add cargo-husky to dev-deps
- create hook
- update `CONTRIBUTING.md`
- ensure that the hook is not installed in CI
@joshka joshka added this pull request to the merge queue Jun 24, 2023
Merged via the queue into ratatui-org:main with commit 669a4d5 Jun 24, 2023
10 checks passed
@SLASHLogin SLASHLogin deleted the feature/pre-push-hook branch June 25, 2023 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants