make: adding lint-ci task

Fixes #50
This commit is contained in:
Tom Gallacher 2016-10-31 14:17:08 +00:00
parent c980b1da53
commit d66fc3c6e3
5 changed files with 29 additions and 11 deletions

View File

@ -4,7 +4,7 @@ check:
-@./bin/setup
SUBDIRS := $(dir $(wildcard */Makefile))
TARGETS := install clean test test-ci lint # whatever else, but must not contain '/'
TARGETS := install clean test test-ci lint lint-ci # whatever else, but must not contain '/'
# foo/.all bar/.all foo/.clean bar/.clean
SUBDIRS_TARGETS := \

View File

@ -31,7 +31,7 @@ dependencies:
test:
override:
- make -j2 lint test-ci
- make -j2 lint-ci test-ci
deployment:
production: # just a label; label names are completely up to you

View File

@ -21,11 +21,12 @@ test:
$(AVA) $(TEST_ARGS)
XUNIT_DIR := ${CIRCLE_TEST_REPORTS}/tap-xunit
XUNIT_ARGS := -t | $(bindir)/tap-xunit >> ${CIRCLE_TEST_REPORTS}/tap-xunit/xunit-$(NAME).xml
XUNIT := $(bindir)/tap-xunit
XUNIT_OUTPUT := >> ${CIRCLE_TEST_REPORTS}/tap-xunit/xunit-$(NAME)
.PHONY: test-ci
test-ci:
mkdir -p $(XUNIT_DIR)
$(NYC) $(AVA) $(XUNIT_ARGS)
$(NYC) $(AVA) -t | $(XUNIT) $(XUNIT_OUTPUT).xml
.PHONY: start
start:
@ -33,4 +34,9 @@ start:
.PHONY: lint
lint:
@$(shell yarn bin)/eslint src
$(bindir)/eslint .
.PHONY: lint-ci
lint-ci:
mkdir -p $(XUNIT_DIR)
-$(bindir)/eslint . --format tap | $(XUNIT) $(XUNIT_OUTPUT)-lint.xml

View File

@ -21,11 +21,12 @@ test:
BABEL_DISABLE_CACHE=1 NODE_ENV=test CONFIG=$(shell pwd)/webpack/index.js $(NYC) $(AVA) test/*.js $(TEST_ARGS)
XUNIT_DIR := ${CIRCLE_TEST_REPORTS}/tap-xunit
XUNIT_ARGS := -t | $(bindir)/tap-xunit >> ${CIRCLE_TEST_REPORTS}/tap-xunit/xunit-$(NAME).xml
XUNIT := $(bindir)/tap-xunit
XUNIT_OUTPUT := >> ${CIRCLE_TEST_REPORTS}/tap-xunit/xunit-$(NAME)
.PHONY: test-ci
test-ci:
mkdir -p $(XUNIT_DIR)
BABEL_DISABLE_CACHE=1 NODE_ENV=test CONFIG=$(shell pwd)/webpack/index.js $(NYC) $(AVA) test/*.js $(XUNIT_ARGS)
BABEL_DISABLE_CACHE=1 NODE_ENV=test CONFIG=$(shell pwd)/webpack/index.js $(NYC) $(AVA) test/*.js -t | $(XUNIT) $(XUNIT_OUTPUT).xml
.PHONY: compile
compile: install
@ -37,4 +38,9 @@ start:
.PHONY: lint
lint:
@$(shell yarn bin)/eslint .
$(bindir)/eslint .
.PHONY: lint-ci
lint-ci:
mkdir -p $(XUNIT_DIR)
-$(bindir)/eslint . --format tap | $(XUNIT) $(XUNIT_OUTPUT)-lint.xml

View File

@ -11,11 +11,12 @@ test:
BABEL_DISABLE_CACHE=1 NODE_ENV=test CONFIG=$(shell pwd)/webpack/index.js $(NYC) $(AVA) test/*.js $(TEST_ARGS)
XUNIT_DIR := ${CIRCLE_TEST_REPORTS}/tap-xunit
XUNIT_ARGS := -t | $(bindir)/tap-xunit >> ${CIRCLE_TEST_REPORTS}/tap-xunit/xunit-$(NAME).xml
XUNIT := $(bindir)/tap-xunit
XUNIT_OUTPUT := >> ${CIRCLE_TEST_REPORTS}/tap-xunit/xunit-$(NAME)
.PHONY: test-ci
test-ci:
mkdir -p $(XUNIT_DIR)
BABEL_DISABLE_CACHE=1 NODE_ENV=test CONFIG=$(shell pwd)/webpack/index.js $(NYC) $(AVA) test/*.js $(XUNIT_ARGS)
BABEL_DISABLE_CACHE=1 NODE_ENV=test CONFIG=$(shell pwd)/webpack/index.js $(NYC) $(AVA) test/*.js -t | $(XUNIT) $(XUNIT_OUTPUT).xml
.PHONY: install-embed-markdown-loader
install-embed-markdown-loader:
@ -44,4 +45,9 @@ clean:
.PHONY: lint
lint:
@$(shell yarn bin)/eslint .
$(bindir)/eslint .
.PHONY: lint-ci
lint-ci:
mkdir -p $(XUNIT_DIR)
-$(bindir)/eslint . --format tap | $(XUNIT) $(XUNIT_OUTPUT)-lint.xml