Would be nice to run hive tests on CI. To do this, start from makefile target - test-hive.
I don't have deep understanding in hive, but in my understanding, you roughly have to do something like this:
# Hive version to use
HIVE_VERSION ?= <commit_hash>
# we define the test-hive target, with two dependencies:
# * ./hive/hive - a hive binary, that will be built from source;
# * docker-local - local docker image for grandine.
.PHONY: test-hive
test-hive: ./hive/hive docker-local
# TODO: run hive here
# define a hive binary, that is being built from source. Notice that it is not defined as .PHONY target,
# because we point to a real binary, to utilize make caching.
./hive/hive:
git clone https://github.com/ethereum/hive --depth 1 # do a shallow clone
@cd hive && git switch $(HIVE_VERSION) # switch to necessary version
@cd hive && go build ... # build hive binary
So as a result, you should get a test-hive makefile target, so you can run hive locally via:
Please don't forget to double-check if caching works properly - in general, hive shouldn't be rebuilt itself, unless HIVE_VERSION changes (or someone clears hive directory by themselves).
After test-hive makefile target works properly, create a github workflow file at .github/workflows/hive.yaml. This workflow will just checkout current repo, then run make test-hive.
Checklist
Self-check your solution before submitting:
Don't forget to copy-paste this checklist into your PR, and tick all the boxes.
Recommendations
You can check how zeam have configured their CI pipeline. Also, feel free to use AI tools for this task.
Also, please avoid external script files (separate .bash/.sh files) - try to keep all configuration inside of single Makefile.
Would be nice to run hive tests on CI. To do this, start from makefile target -
test-hive.I don't have deep understanding in
hive, but in my understanding, you roughly have to do something like this:So as a result, you should get a
test-hivemakefile target, so you can run hive locally via:Please don't forget to double-check if caching works properly - in general, hive shouldn't be rebuilt itself, unless
HIVE_VERSIONchanges (or someone clears hive directory by themselves).After
test-hivemakefile target works properly, create a github workflow file at.github/workflows/hive.yaml. This workflow will just checkout current repo, then runmake test-hive.Checklist
Self-check your solution before submitting:
make test-hiveworks, on a clean repo checkout, without additional setup (apart from system installation, likegotoolchain);make test-hivesecond time doesn't rebuild hive itself;make test-hive HIVE_VERSION=<some_other_commit_hash>rebuilds hive properly and re-runs tests;make cleancleans uphivedirectory;Don't forget to copy-paste this checklist into your PR, and tick all the boxes.
Recommendations
You can check how zeam have configured their CI pipeline. Also, feel free to use AI tools for this task.
Also, please avoid external script files (separate .bash/.sh files) - try to keep all configuration inside of single Makefile.