From c71ad1cc591c6e411fc9c6ea36aba93b8b2c4d33 Mon Sep 17 00:00:00 2001 From: Achilles Rasquinha Date: Sun, 25 Mar 2018 14:25:23 +0530 Subject: [PATCH] [TEST] Add .travis.yml --- .travis.yml | 12 ++++++++++++ Makefile | 14 ++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..40c3767 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,12 @@ +language: node_js + +node_js: + - "6" + - "8" + +before_install: + - git clone https://github.com/frappe/charts && cd charts + - make install + +script: + - make test \ No newline at end of file diff --git a/Makefile b/Makefile index d950d83..1f06736 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,20 @@ build: $(NODEBIN)/rollup \ --config $(BASEDIR)/rollup.config.js +install.dep: +ifeq ($(shell command -v yarn),) + @echo "Installing yarn..." + + $(eval npm := $(shell command -v npm)) + $(npm) install -g yarn +endif + + $(eval yarn := $(shell command -v yarn)) + +install: install.dep + $(yarn) \ + --cwd $(BASEDIR) + test: NODE_ENV=test \ $(NODEBIN)/mocha \