extract the test target
This commit is contained in:
parent
68cf434afb
commit
b3b2250076
1 changed files with 12 additions and 3 deletions
15
Makefile
15
Makefile
|
@ -22,8 +22,8 @@ HAS_SERVER=$(shell build/bin/manifest has_server)
|
||||||
# Determine if a webapp is defined in plugin.json
|
# Determine if a webapp is defined in plugin.json
|
||||||
HAS_WEBAPP=$(shell build/bin/manifest has_webapp)
|
HAS_WEBAPP=$(shell build/bin/manifest has_webapp)
|
||||||
|
|
||||||
# all, the default target, builds and bundle the plugin.
|
# all, the default target, tests, builds and bundles the plugin.
|
||||||
all: dist
|
all: test dist
|
||||||
|
|
||||||
# apply propagates the plugin id into the server/ and webapp/ folders as required.
|
# apply propagates the plugin id into the server/ and webapp/ folders as required.
|
||||||
.PHONY: apply
|
.PHONY: apply
|
||||||
|
@ -51,7 +51,6 @@ endif
|
||||||
.PHONY: webapp
|
.PHONY: webapp
|
||||||
webapp: webapp/.npminstall
|
webapp: webapp/.npminstall
|
||||||
ifneq ($(HAS_WEBAPP),)
|
ifneq ($(HAS_WEBAPP),)
|
||||||
cd webapp && npm run fix;
|
|
||||||
cd webapp && npm run build;
|
cd webapp && npm run build;
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -101,6 +100,16 @@ else
|
||||||
@echo "No supported deployment method available. Install plugin manually."
|
@echo "No supported deployment method available. Install plugin manually."
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# test runs any lints and unit tests defined for the server and webapp, if they exist
|
||||||
|
.PHONY: test
|
||||||
|
test:
|
||||||
|
ifneq ($(HAS_SERVER),)
|
||||||
|
cd server && $(GO) test ./...
|
||||||
|
endif
|
||||||
|
ifneq ($(HAS_WEBAPP),)
|
||||||
|
cd webapp && npm run fix;
|
||||||
|
endif
|
||||||
|
|
||||||
# clean removes all build artifacts
|
# clean removes all build artifacts
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
|
|
Reference in a new issue