From 66b347576c646f566cd3e7f979fee2f699abf6d6 Mon Sep 17 00:00:00 2001 From: Sebastian McKenzie Date: Thu, 9 Oct 2014 14:04:31 +1100 Subject: [PATCH] run tests on publish --- .gitignore | 1 + Makefile | 19 +++++++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 357a77091c..bd6608341b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ .DS_Store node_modules +test/tmp *.log *.cache /templates.json diff --git a/Makefile b/Makefile index 636a84fca2..1846e91f5b 100644 --- a/Makefile +++ b/Makefile @@ -3,13 +3,15 @@ MOCHA_CMD = node_modules/mocha/bin/_mocha export NODE_ENV = test -.PHONY: clean test test-cov test-travis publish bench +.PHONY: clean test test-cov test-travis publish bench build clean: - rm -rf coverage templates.json + rm -rf coverage templates.json test/tmp test: + make clean $(MOCHA_CMD) + rm -rf test/tmp bench: node node_modules/matcha/bin/_matcha @@ -17,13 +19,26 @@ bench: test-cov: make clean node $(ISTANBUL_CMD) $(MOCHA_CMD) -- + rm -rf test/tmp test-travis: node $(ISTANBUL_CMD) $(MOCHA_CMD) --report lcovonly -- --reporter spec if test -n "$$CODECLIMATE_REPO_TOKEN"; then codeclimate < coverage/lcov.info; fi +build: + # build for the browser + publish: make clean + + rm -rf node_modules + npm install + node bin/cache-templates + make test + npm publish + + # todo - auto-create tag + make clean