[contracts] Run contract tests in CI

Introduce new nimble 'test' task that runs *all* tests.
Renames testAll to testDagger, because testAll didn't
run all tests, it forgot to run the contract tests.
This commit is contained in:
Mark Spanbroek 2022-03-15 15:24:03 +01:00 committed by markspanbroek
parent e965f5e0de
commit d07a5cd19e
3 changed files with 10 additions and 10 deletions

View File

@ -65,12 +65,6 @@ update: | update-common
rm -rf dagger.nims && \
$(MAKE) dagger.nims $(HANDLE_OUTPUT)
# a phony target, because teaching `make` how to do conditional recompilation of Nim projects is too complicated
testAll: | build deps
echo -e $(BUILD_MSG) "build/$@" && \
$(ENV_SCRIPT) nim testAll $(NIM_PARAMS) dagger.nims
# detecting the os
ifeq ($(OS),Windows_NT) # is Windows_NT on XP, 2000, 7, Vista, 10...
detected_OS := Windows
@ -81,8 +75,10 @@ else
detected_OS := $(strip $(shell uname))
endif
# Builds and run the test suite (Waku v1 + v2)
test: | testAll
# Builds and run the test suite
test: | build deps
echo -e $(BUILD_MSG) "build/$@" && \
$(ENV_SCRIPT) nim test $(NIM_PARAMS) dagger.nims
# symlink
dagger.nims:

View File

@ -51,8 +51,12 @@ task testContracts, "Build, deploy and test contracts":
# kill simulator processes
exec "ps -ef | grep hardhat | grep -v grep | awk '{ print $2 }' | xargs kill"
task testAll, "Build & run Dagger tests":
test "testAll", params = "-d:chronicles_log_level=WARN"
task testDagger, "Build & run Dagger tests":
test "testDagger", params = "-d:chronicles_log_level=WARN"
task test, "Run all tests":
testDaggerTask()
testContractsTask()
task dagger, "build dagger binary":
buildBinary "dagger"