Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Added Travis CI support. #172

Merged
merged 8 commits into from

4 participants

@qubyte

Note that tests pass for zmq2, but not zmq3. This behaviour was confirmed locally.

@qubyte

All tests now pass.

@ronkorving
Collaborator

Looks good, thanks!

@ronkorving ronkorving merged commit 75fb4cc into from
@ronkorving
Collaborator

I've merged it, but the build status stays unknown.
@JustinTulloss , could you enable the Travis service hook?

@JustinTulloss

I enabled it, it still says unknown. I think it might be building? I'll look into it again shortly if it doesn't update.

@qubyte

You may need to enable this from the Travis side. There's a box in the service hooks travis CI tab. I used the instructions in there to get it working for me. Make sure that the active box is checked. I made that mistake initially. Probably the problem is the token though.

Even when it is properly set, the build takes a while. The config file I wrote will spawn four workers, so four tests are entered into the queue. When at least one gets the top of the queue and starts the build state will go amber within Travis CI, and if you inspect it you can see the build process itself. It's a little difficult to describe how to navigate that, but you'll know when it's working.

screen

@ronkorving
Collaborator

@JustinTulloss so, now after the weekend, it still says build status unknown. Could you have another look? (see @qubyte 's response above)

@AlexeyKupershtokh
Collaborator

Is it enabled on this page: https://travis-ci.org/profile ?

Travis CI - Free Hosted Continuous Integration Platform for the Open Source Community - Google Chrome_054

@qubyte

@AlexeyKupershtokh Try hitting the Sync now button and seeing if the list updates with the repo. Once it appears, switching to on should complete the configuration. It may or may not require some action (such as a merge into master) to activate a build after this.

@AlexeyKupershtokh
Collaborator

@qubyte I don't have any problems :) Just hinting where @JustinTulloss should look for enabling the repo as well.

@qubyte

@AlexeyKupershtokh Ah! My bad. I was on automatic and thought I was talking to @JustinTulloss. :)

@ronkorving
Collaborator

@JustinTulloss any update on this?

@JustinTulloss

Appears to be working now.

@ronkorving
Collaborator

Awesome, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jan 16, 2013
  1. Added Travis CI support.

    Mark Everitt authored
  2. More on version specific testing.

    Mark Everitt authored
  3. Some of the flags should have been v3+.

    Mark Everitt authored
  4. Version checking now delegated to semver.

    Mark Everitt authored
  5. Merge branch 'master' of git://github.com/JustinTulloss/zeromq.node i…

    Mark Everitt authored
    …nto feature/travis
  6. Rogue console.log removed.

    Mark Everitt authored
This page is out of date. Refresh to see the latest.
Showing with 90 additions and 16 deletions.
  1. +17 −0 .travis.yml
  2. +2 −0  README.md
  3. +6 −2 package.json
  4. +65 −14 test/test.exports.js
View
17 .travis.yml
@@ -0,0 +1,17 @@
+env:
+ - ZMQ="git://github.com/zeromq/zeromq2-x.git"
+ - ZMQ="git://github.com/zeromq/zeromq3-x.git"
+before_install:
+ - sudo apt-get install uuid-dev
+ - git clone --depth 1 $ZMQ zmqlib
+ - cd zmqlib
+ - ./autogen.sh
+ - ./configure
+ - make
+ - sudo make install
+ - sudo /sbin/ldconfig
+ - cd ..
+language: node_js
+node_js:
+ - "0.8"
+ - "0.9"
View
2  README.md
@@ -1,3 +1,5 @@
+[![Build Satus](https://travis-ci.org/JustinTulloss/zeromq.node)]
+
# node-zeromq
[ØMQ](http://www.zeromq.org/) bindings for node.js.
View
8 package.json
@@ -11,11 +11,15 @@
"should": "*",
"batch": "*",
"jade": "*",
- "dox": "*"
+ "dox": "*",
+ "semver": "*"
},
"engines": {
"node": ">=0.7.9"
},
+ "scripts": {
+ "test": "make test"
+ },
"contributors": [
"Justin Tulloss <justin.tulloss@gmail.com> (http://justin.harmonize.fm)",
"Stéphan Kochen <stephan@kochen.nl> (http://stephan.kochen.nl/)",
@@ -27,4 +31,4 @@
"Micheil Smith <micheil@brandedcode.com> (http://brandedcode.com/)",
"TJ Holowaychuk <tj@vision-media.ca> (http://tjholowaychuk.com/)"
]
-}
+}
View
79 test/test.exports.js
@@ -1,26 +1,77 @@
var zmq = require('../')
- , should = require('should');
+ , should = require('should')
+ , semver = require('semver');
// version
-zmq.version.should.match(/^\d+\.\d+\.\d+$/);
+semver.valid(zmq.version).should.be.ok;
-// socket types
+// socket types and socket opts
-['PUB', 'SUB', 'REQ', 'XREQ', 'XREP',
- 'DEALER', 'ROUTER', 'PUSH', 'PULL', 'PAIR'].forEach(function(type){
- zmq['ZMQ_' + type].should.be.a('number');
-});
+// All versions.
+var constants = [
+ 'PUB',
+ 'SUB',
+ 'REQ',
+ 'XREQ',
+ 'REP',
+ 'XREP',
+ 'DEALER',
+ 'ROUTER',
+ 'PUSH',
+ 'PULL',
+ 'PAIR',
+ 'AFFINITY',
+ 'IDENTITY',
+ 'SUBSCRIBE',
+ 'UNSUBSCRIBE',
+ 'RATE',
+ 'RECOVERY_IVL',
+ 'SNDBUF',
+ 'RCVBUF',
+ 'RCVMORE',
+ 'FD',
+ 'EVENTS',
+ 'TYPE',
+ 'LINGER',
+ 'RECONNECT_IVL',
+ 'BACKLOG',
+ 'POLLIN',
+ 'POLLOUT',
+ 'POLLERR',
+ 'SNDMORE'
+];
+
+// 2.x only.
+if (semver.satisfies(zmq.version, '2.x')) {
+ constants.concat([
+ 'HWM',
+ 'SWAP',
+ 'MCAST_LOOP',
+ 'NOBLOCK'
+ ]);
+}
+
+// 3.x only.
+if (semver.satisfies(zmq.version, '3.x')) {
+ constants.concat([
+ 'XPUB',
+ 'XSUB',
+ 'SNDHWM',
+ 'RCVHWM'
+ ]);
+}
-// socket opts
+// 3.2 and above.
+if (semver.gte('3.2')) {
+ constants.concat([
+ 'LAST_ENDPOINT'
+ ]);
+}
-['HWM', 'SWAP', 'AFFINITY', 'IDENTITY',
- 'SUBSCRIBE', 'UNSUBSCRIBE', 'RATE',
- 'RECOVERY_IVL', 'RECOVERY_IVL', 'MCAST_LOOP',
- 'SNDBUF', 'RCVBUF', 'RCVMORE', 'SNDMORE', 'FD', 'EVENTS',
- 'TYPE', 'LINGER', 'RECONNECT_IVL', 'BACKLOG'].forEach(function(prop){
- zmq['ZMQ_' + prop].should.be.a('number');
+constants.forEach(function(typeOrProp){
+ zmq['ZMQ_' + typeOrProp].should.be.a('number');
});
// states
Something went wrong with that request. Please try again.