Skip to content

Commit

Permalink
Merge pull request #68 from seomoz/bkirz/build-matrix-redis-versions
Browse files Browse the repository at this point in the history
Build against multiple redis versions.
  • Loading branch information
bkirz authored Mar 3, 2017
2 parents cd7f5fb + c1f8687 commit a835721
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 5 deletions.
11 changes: 8 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
sudo: false
services:
- redis-server
language: python
python:
- 2.6
- 2.7
- pypy
install:
- make redis
- pip install redis --use-mirrors
script: make test
env:
- REDIS_VERSION=3.0.7
- REDIS_VERSION=3.2.8
matrix:
allow_failures:
- env: REDIS_VERSION=3.2.8
script: make test
21 changes: 19 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,26 @@ qless.lua: qless-lib.lua api.lua
egrep -v '^[[:space:]]*--[^\[]' | \
egrep -v '^--$$' >> qless.lua

REDIS_VERSION ?= stable
REDIS_DIR = redis-$(REDIS_VERSION)
REDIS_TAR = redis-$(REDIS_VERSION).tar.gz
REDIS_BIN = $(REDIS_DIR)/src/redis-server

.PHONY: clean test redis
clean:
rm -f qless.lua qless-lib.lua
rm -rf qless.lua qless-lib.lua $(REDIS_TAR) $(REDIS_DIR)

.PHONY: test
test: qless.lua *.lua
nosetests --exe -v

$(REDIS_TAR):
curl -O http://download.redis.io/releases/$(REDIS_TAR)

$(REDIS_DIR): $(REDIS_TAR)
tar xvf $(REDIS_TAR)

$(REDIS_BIN): $(REDIS_DIR)
cd $(REDIS_DIR) && make

redis: $(REDIS_BIN)
$(REDIS_BIN) --daemonize yes

0 comments on commit a835721

Please sign in to comment.