Browse Source

Update the Makefile to handle the Node server

reboot
Nicolas Petton 3 years ago
parent
commit
1fc8cc7997
No known key found for this signature in database GPG Key ID: E8BCD7866AFCF978
2 changed files with 20 additions and 8 deletions
  1. +1
    -1
      .gitlab-ci.yml
  2. +19
    -7
      Makefile

+ 1
- 1
.gitlab-ci.yml View File

@ -4,7 +4,7 @@ image: nicolaspetton/emacs-nodejs-docker:latest
before_script:
- evm use $EMACS_VERSION
- emacs --version
- make ci-dependencies
- make dependencies
.test_job_template: &test_job_definition
<<: *prepare_job_template


+ 19
- 7
Makefile View File

@ -4,7 +4,6 @@ LOAD_PATH = -L .
EMACSBIN ?= emacs
BATCH = $(EMACSBIN) -Q --batch $(LOAD_PATH) \
--eval "(setq load-prefer-newer t)" \
--eval "(require 'package)" \
--eval "(add-to-list 'package-archives '(\"melpa-stable\" . \"http://stable.melpa.org/packages/\"))" \
--funcall package-initialize
@ -13,14 +12,13 @@ SILENCE-SOME-DEPRECATION = --load subr-x
SILENCE-SOME-DEPRECATION += --eval "(put 'when-let 'byte-obsolete-info nil)"
SILENCE-SOME-DEPRECATION += --eval "(put 'if-let 'byte-obsolete-info nil)"
.PHONY: all clean ci-dependencies check test lint
.PHONY: all clean dependencies check test test-elisp test-javascript lint lint-elisp lint-javascript
all: check
clean:
rm -f /tmp/undercover_coveralls_report
dependencies: dependencies-elisp dependencies-javascript
ci-dependencies:
dependencies-elisp:
# Install dependencies in ~/.emacs.d/elpa
$(BATCH) \
--funcall package-refresh-contents \
@ -28,19 +26,33 @@ ci-dependencies:
--eval "(package-install 'undercover)" \
--eval "(package-install 'buttercup)" \
--eval "(package-install 'js2-mode)" \
--eval "(package-install 'js2-refactor)" \
--eval "(package-install 'assess)" \
--eval "(package-install 'exec-path-from-shell)"
dependencies-javascript:
cd server && npm install
check: test lint
test:
test: test-elisp test-javascript
test-elisp:
TRAVIS=true $(BATCH) $(SILENCE-SOME-DEPRECATION) \
-l buttercup \
-l test/test-helper.el \
-f buttercup-run-discover
lint:
test-javascript:
cd server && ./node_modules/.bin/jasmine .
lint: lint-elisp lint-javascript
lint-elisp:
# Byte compile all and stop on any warning or error
$(BATCH) $(SILENCE-SOME-DEPRECATION) \
--eval "(setq byte-compile-error-on-warn t)" \
-f batch-byte-compile ${SRCS}
lint-javascript:
cd server && ./node_modules/.bin/eslint .

Loading…
Cancel
Save