From 03c8ceccf9335ca41eea2525f1545b10b4999bcd Mon Sep 17 00:00:00 2001 From: Mark Spanbroek Date: Mon, 28 Mar 2022 10:18:53 +0200 Subject: [PATCH] [contracts] Separate nimble task to run all tests A simple "nimble test" won't require you to run a hardhat node with the contracts, but a "nimble testAll" will. --- .github/workflows/ci.yml | 2 +- Makefile | 7 ++++++- dagger.nimble | 5 ++++- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a7528760..b2a4b10e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -185,4 +185,4 @@ jobs: shell: bash working-directory: nim-dagger run: | - make test + make testAll diff --git a/Makefile b/Makefile index 209074ad..4fedae7b 100644 --- a/Makefile +++ b/Makefile @@ -75,11 +75,16 @@ else detected_OS := $(strip $(shell uname)) endif -# Builds and run the test suite +# Builds and run a part of the test suite test: | build deps echo -e $(BUILD_MSG) "build/$@" && \ $(ENV_SCRIPT) nim test $(NIM_PARAMS) dagger.nims +# Builds and runs all tests +testAll: | build deps + echo -e $(BUILD_MSG) "build/$@" && \ + $(ENV_SCRIPT) nim testAll $(NIM_PARAMS) dagger.nims + # symlink dagger.nims: ln -s dagger.nimble $@ diff --git a/dagger.nimble b/dagger.nimble index a9dfd908..f6107b9b 100644 --- a/dagger.nimble +++ b/dagger.nimble @@ -40,7 +40,10 @@ task testDagger, "Build & run Dagger tests": task testContracts, "Build & run Dagger Contract tests": test "testContracts", "tests/", "-d:chronicles_log_level=WARN" -task test, "Run all tests": +task test, "Run tests": + testDaggerTask() + +task testAll, "Run all tests": testDaggerTask() testContractsTask()