Skip to content

Commit

Permalink
Testing a new script for download Neo4j and run Coveralls
Browse files Browse the repository at this point in the history
  • Loading branch information
josemazo committed Nov 14, 2013
1 parent c713253 commit 6a09c85
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 3 deletions.
12 changes: 9 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
language: python
python:
- "2.7"
before_install:
- ./download_and_install_neo4j.sh $NEO4J_VERSION
- ./neo4j/bin/neo4j start
install:
- pip install -U -r requirements.txt --use-mirrors
# - pip install coveralls --use-mirrors
- pip install coveralls --use-mirrors
env:
- NEO4J_VERSION="1.9.2"
script:
- python sylva/manage.py test accounts schemas data
- coverage run --source=sylva sylva/manage.py test accounts schemas graphs data
after_success:
# - coveralls
- ./neo4j/bin/neo4j stop
- coveralls
27 changes: 27 additions & 0 deletions download_and_install_neo4j.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

DEFAULT_VERSION="1.9.2"
VERSION=${1-$DEFAULT_VERSION}
OLD_DIR="neo4j-community-$VERSION"
NEW_DIR="neo4j"
FILE="$OLD_DIR-unix.tar.gz"
DOWNLOAD_SERVER="http://dist.neo4j.org/"
DOWNLOAD_URL="$DOWNLOAD_SERVER$FILE"
SERVER_PROPERTIES_FILE="neo4j/conf/neo4j-server.properties"
OLD_URL="\/db\/data\/"
NEW_URL="\/db\/sylva\/"
OLD_PORT="7474"
NEW_PORT="7373"

wget $DOWNLOAD_URL
tar -zxvf $FILE > /dev/null
rm $FILE
mv $OLD_DIR $NEW_DIR

if grep $OLD_PORT $SERVER_PROPERTIES_FILE > /dev/null; then
sed -i s/$OLD_PORT/$NEW_PORT/g $SERVER_PROPERTIES_FILE
fi

if grep $OLD_URL $SERVER_PROPERTIES_FILE > /dev/null; then
sed -i s/$OLD_URL/$NEW_URL/g $SERVER_PROPERTIES_FILE
fi

0 comments on commit 6a09c85

Please sign in to comment.