-
Notifications
You must be signed in to change notification settings - Fork 127
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-push
git hooks errors + should be limited to formatting only
#1038
Comments
Here are the run times for the scripts:
Total run time of the
@plebhash, do you want to keep the |
I am experiencing the following issues in running
My solution is to add |
@plebhash, thoughts on splitting up the
Or is there a reason why these are all grouped together? If we choose to keep in same file, we should rename to |
I think they are grouped just for convenience. I would keep them together, renaming the script in |
Background
act
is a tool that works with Docker to run GitHub Actions workflows locally, designed to be run before pushing changes. The.githooks/pre-push
usesact
to run some GitHub workflows with% ./.githooks/pre-push origin https://github.com/stratum-mining/stratum.git
.The currently defined workflows in this
pre-push
script are:message_generator_check
(this is not an existing workflow, probably trying to referencemessage-generator-test
)sv2_header_check
fmt
clippy-check
ci
During the 2024.07.02 dev meet, the team decided that the
pre-push
should only containing more commonly needed workflows, like for formatting. Additionally, because of long run times when usingact
, the usage ofact
should be replaced with calling the bash scripts in thescripts/
directory in the repo root. This will keep thepre-push
runtime shorter, and then any more specific workflows needed can be run manually by executing the bash scripts in thescripts/
directory on thedev
branch.Problem
pre-push
script should only contain workflows that are more commonly run, like for linting.message_generator_check
is causing thepre-push
to fail.act
are long.Solution
In
.githooks/pre-push
, replace the use ofact
with calls to the following bash scripts in thescripts/
directory on thedev
branch:clippy-on-all-workspaces.sh
: Runscargo clippy
,cargo test
, andcargo +nightly fmt
.sv2-header-check.sh
: Ensures that thesv2.h
file generated bybuild_header.sh
is in sync with the commitedprotocols/v2/sv2-ffi/sv2.h
.The text was updated successfully, but these errors were encountered: