Skip to content

Commit

Permalink
Add simple check script for ensuring successful compile
Browse files Browse the repository at this point in the history
  • Loading branch information
Stephen Parente committed Mar 15, 2018
1 parent 80a25e0 commit 5590335
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 9 deletions.
28 changes: 20 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ matrix:
nodejs:
- 4
- 6
services:
- docker
before_install:
- ./run_docker.sh
script:
- make lint
- make test
- make e2e
- os: linux
dist: trusty
sudo: required
Expand All @@ -15,6 +23,14 @@ matrix:
- eval "$(ssh-agent -s)"
- chmod 600 /tmp/deploy
- ssh-add /tmp/deploy
services:
- docker
before_install:
- ./run_docker.sh
script:
- make lint
- make test
- make e2e
deploy:
provider: script
script: ./make_docs.sh
Expand All @@ -23,15 +39,11 @@ matrix:
tags: true
- os: osx
osx_image: xcode8
script:
- make lint
- make test
- make check
language: node_js
cache:
directories:
- node_modules
services:
- docker
before_install:
- ./run_docker.sh
script:
- make lint
- make test
- make e2e
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ifeq ($(BUILDTYPE),Debug)
GYPBUILDARGS=--debug
endif

.PHONY: all clean lint test lib docs e2e ghpages
.PHONY: all clean lint test lib docs e2e ghpages check

all: lint lib test e2e

Expand All @@ -59,6 +59,9 @@ $(CONFIG_OUTPUTS): node_modules/.dirstamp binding.gyp
test: node_modules/.dirstamp
@./node_modules/.bin/mocha $(TEST_REPORTER) $(TESTS) $(TEST_OUTPUT)

check: node_modules/.dirstamp
@$(NODE) util/test-compile.js

e2e: $(E2E_TESTS)
@./node_modules/.bin/mocha $(TEST_REPORTER) $(E2E_TESTS) $(TEST_OUTPUT)

Expand Down
11 changes: 11 additions & 0 deletions util/test-compile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
var kafka = require('../lib');

var p = new kafka.Producer({ 'bootstrap.servers': 'localhost:9092' }, {});

p.connect({ timeout: 1000 }, function(err) {
if (!err) {
p.disconnect();
} else {
process.exit(0);
}
});

0 comments on commit 5590335

Please sign in to comment.