1
0
mirror of https://github.com/yldio/copilot.git synced 2024-12-01 07:30:07 +02:00

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 -@./bin/setup
SUBDIRS := $(dir $(wildcard */Makefile)) 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 # foo/.all bar/.all foo/.clean bar/.clean
SUBDIRS_TARGETS := \ SUBDIRS_TARGETS := \

View File

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

View File

@ -21,11 +21,12 @@ test:
$(AVA) $(TEST_ARGS) $(AVA) $(TEST_ARGS)
XUNIT_DIR := ${CIRCLE_TEST_REPORTS}/tap-xunit 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 .PHONY: test-ci
test-ci: test-ci:
mkdir -p $(XUNIT_DIR) mkdir -p $(XUNIT_DIR)
$(NYC) $(AVA) $(XUNIT_ARGS) $(NYC) $(AVA) -t | $(XUNIT) $(XUNIT_OUTPUT).xml
.PHONY: start .PHONY: start
start: start:
@ -33,4 +34,9 @@ start:
.PHONY: lint .PHONY: lint
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) 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_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 .PHONY: test-ci
test-ci: test-ci:
mkdir -p $(XUNIT_DIR) 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 .PHONY: compile
compile: install compile: install
@ -37,4 +38,9 @@ start:
.PHONY: lint .PHONY: lint
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) 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_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 .PHONY: test-ci
test-ci: test-ci:
mkdir -p $(XUNIT_DIR) 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 .PHONY: install-embed-markdown-loader
install-embed-markdown-loader: install-embed-markdown-loader:
@ -44,4 +45,9 @@ clean:
.PHONY: lint .PHONY: lint
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