diff --git a/Makefile b/Makefile index b039d81..1d3aa9c 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ SHELL=bash NEOGO?=neo-go VERSION?=$(shell git describe --tags) -.PHONY: all build sidechain +.PHONY: all build sidechain test build: all all: sidechain mainnet sidechain: alphabet morph nns @@ -33,6 +33,9 @@ morph: $(foreach sc,$(morph_sc),$(sc)/$(sc)_contract.nef) mainnet: $(foreach sc,$(mainnet_sc),$(sc)/$(sc)_contract.nef) nns: $(foreach sc,$(nns_sc),$(sc)/$(sc)_contract.nef) +test: + @go test ./tests/... + clean: find . -name '*.nef' -exec rm -rf {} \; find . -name 'config.json' -exec rm -rf {} \; diff --git a/README.md b/README.md index 8e4404f..22d7275 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,14 @@ $ NEOGO=/home/user/neo-go/bin/neo-go make all Remove compiled files with `make clean` or `make mr_proper` command. +# Testing +Smartcontract tests reside in `tests/` directory. To execute test suite +after applying changes simply run `make test`. +``` +$ make test +ok github.com/nspcc-dev/neofs-contract/tests 0.462s +``` + # NeoFS API compatibility |neofs-contract version|supported NeoFS API versions|