Skip to content

Commit

Permalink
Getting an nsqd instance on Travis
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Lecocq committed Feb 16, 2014
1 parent c8589c1 commit abd025d
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
@@ -1,6 +1,10 @@
language: python
python:
- "2.7"
env:
- NSQ_VERSION=0.2.26
# Get some pre-requisites
before_install: "bash scripts/travis/before-install.sh"
# command to install dependencies
install: "pip install -r requirements.txt"
# command to run tests
Expand Down
18 changes: 18 additions & 0 deletions scripts/travis/before-install.sh
@@ -0,0 +1,18 @@
#! /usr/bin/env bash

# Download and install the NSQ binaries
export NSQ_DIST="nsq-${NSQ_VERSION}.linux-$(go env GOARCH).go1.2"
wget "https://s3.amazonaws.com/bitly-downloads/nsq/${NSQ_DIST}.tar.gz"
tar xf "${NSQ_DIST}.tar.gz"
(
cd "${NSQ_DIST}"
sudo cp bin/* /usr/local/bin/
)

# Start nsqlookupd and disown it
nsqlookupd > /dev/null 2> /dev/null &
disown

# And an instance of nsqd
nsqd --lookupd-tcp-address=127.0.0.1:4160 > /dev/null 2> /dev/null &
disown

0 comments on commit abd025d

Please sign in to comment.