mirror of
https://gitea.invidious.io/iv-org/shard-radix.git
synced 2024-08-15 00:43:21 +00:00
Add simper spec runners (with make)
Allow usage of `make spec` to run project's specs against default Crystal compiler or one that can be supplied with `CRYSTAL` environment variable. Also provide ways to run in automated mode thanks to watchexec. [skip ci]
This commit is contained in:
parent
211418416a
commit
905bd9e14b
1 changed files with 18 additions and 0 deletions
18
Makefile
Normal file
18
Makefile
Normal file
|
@ -0,0 +1,18 @@
|
|||
CRYSTAL ?= crystal
|
||||
|
||||
profile ?= ## Display profiling information after specs execution
|
||||
verbose ?= ## Run specs in verbose mode
|
||||
|
||||
SPEC_FLAGS := $(if $(profile),--profile )$(if $(verbose),--verbose )
|
||||
|
||||
.PHONY: default autospec spec
|
||||
|
||||
default: spec
|
||||
|
||||
# `autospec` task uses `watchexec` external dependency:
|
||||
# https://github.com/mattgreen/watchexec
|
||||
autospec:
|
||||
watchexec --exts cr --watch spec --watch src --clear $(CRYSTAL) spec $(SPEC_FLAGS)
|
||||
|
||||
spec:
|
||||
$(CRYSTAL) spec $(SPEC_FLAGS)
|
Loading…
Reference in a new issue