sea-orm icon indicating copy to clipboard operation
sea-orm copied to clipboard

[ADD]: Pre-commit hook to keep the project clean

Open AbhijithGanesh opened this issue 2 years ago • 10 comments

Summary

One can run a script to verify whether their changes are working, do they pass the automated tests etc?

Motivation

Integration tests

Additional Information

AbhijithGanesh avatar Mar 10 '22 09:03 AbhijithGanesh

Hey @AbhijithGanesh, we do have GitHub Actions for running unit tests and integration tests. https://github.com/SeaQL/sea-orm/actions

billy1624 avatar Mar 10 '22 09:03 billy1624

@billy1624 I meant, local pre-commit hooks for a smoother dev flow

AbhijithGanesh avatar Mar 14 '22 03:03 AbhijithGanesh

Apologies, closed by mistake.

AbhijithGanesh avatar Mar 14 '22 03:03 AbhijithGanesh

Apologies, closed by mistake.

Hahaa nvm!

billy1624 avatar Mar 14 '22 05:03 billy1624

I wonder what will be checked inside the pre-commit hooks? For example, running cargo fmt?

billy1624 avatar Mar 14 '22 05:03 billy1624

Unfortunately I have not seen #611 before amking this. I think there is a slight conflict now, i will touch on this under the actual PR.

maltevesper avatar May 21 '22 23:05 maltevesper

Hey @AbhijithGanesh, sorry for the conflict. I think similar code has been merged

  • https://github.com/SeaQL/sea-orm/pull/840
  • https://github.com/SeaQL/sea-orm/pull/919

Please check if you have anything to add.

billy1624 avatar Aug 02 '22 13:08 billy1624

Thanks @billy1624

AbhijithGanesh avatar Aug 04 '22 10:08 AbhijithGanesh

Hey @AbhijithGanesh, please close this issue and PR (https://github.com/SeaQL/sea-orm/pull/611) if you think the merged PR is good enough and you have nothing to add.

Once again, thank you so much for the contributions :)

billy1624 avatar Aug 04 '22 10:08 billy1624

I think this PR is still open which can be merged. It's a pre commit check script which I think was good for developers to run locally.

AbhijithGanesh avatar Aug 04 '22 10:08 AbhijithGanesh