forked from camptocamp/tilecloud-chain
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
69 lines (56 loc) · 2.58 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
language: python
python:
- 2.6
- 2.7
env:
global:
- BERKELEYDB_LIBDIR=/usr/lib/x86_64-linux-gnu BERKELEYDB_INCDIR=/usr/include
- BUNDLE_ARCHIVE="tilecloud_chain"
- AWS_S3_REGION="eu-west-1"
- AWS_S3_BUCKET="sbrunner-travis"
- secure: eweCyRupGDD0En9a3aXxO5QY8WO2xxMmUr42DdSUndOtbLk4GAo6ieZT77Pl91gwhh27WRMVoQQzByrNuQy/jEM+EA9Xoxy+KYqasfi7mbF7kWZ1HNEaAdqTi6RosihXmIoaaeMrjy+/gULSDgtOPDhompU4qaWfPnz1MjCRg7k=
before_install:
- ssh-keygen -t rsa -C your_email@youremail.com -P '' -f ~/.ssh/id_rsa
- cat /home/travis/.ssh/id_rsa.pub >> /home/travis/.ssh/authorized_keys
- ln -s /home/travis/.ssh/authorized_keys /home/travis/.ssh/authorized_keys2
- echo "Host localhost" >> /home/travis/.ssh/config
- echo " StrictHostKeyChecking no" >> /home/travis/.ssh/config
- chmod g-rw,o-rw ~/.ssh/*
- chmod 644 ~/.bashrc
- echo "PATH=${PATH}" > ~/.bashrc
- echo 'yes' | sudo add-apt-repository ppa:stephane-brunner/precise
- echo 'yes' | sudo add-apt-repository ppa:mapnik/v2.2.0
- sudo apt-get update
- sudo apt-get install -y libmapnik-dev python-mapnik apache2 cgi-mapserver deploy libdb-dev optipng
- sudo -u postgres tilecloud_chain/tests/create_test_data.sh
- sudo cp tilecloud_chain/tests/apache.conf /etc/apache2/sites-enabled/apache.conf
- sudo apache2ctl graceful
- mkdir ~/.aws
- echo [default] > ~/.aws/config
- echo aws_access_key_id=${AWS_S3_KEY} >> ~/.aws/config
- echo aws_secret_access_key=${AWS_S3_SECRET} >> ~/.aws/config
- sudo pip install awscli
- aws s3 sync s3://${AWS_S3_BUCKET}/${BUNDLE_ARCHIVE}/buildout-${TRAVIS_PYTHON_VERSION}/ buildout/
- chmod +x ./buildout/bin/*
- aws s3 sync s3://${AWS_S3_BUCKET}/${BUNDLE_ARCHIVE}/mapnik-${TRAVIS_PYTHON_VERSION}/ ${HOME}/virtualenv/python${TRAVIS_PYTHON_VERSION}/
- sudo tilecloud_chain/tests/create-deploy.sh
- sudo mkdir /tmp/tests
- sudo chmod g+s,o+w /tmp/tests
install:
- pip install -U mapnik2==2.2.0
- python bootstrap.py -v 1.7.1
- ./buildout/bin/buildout -c buildout_travis.cfg
script:
- find tilecloud_chain -name \*.py | xargs ./buildout/bin/flake8 --max-line-length=120
- ./buildout/bin/python setup.py nosetests
after_script:
- aws s3 sync --delete --exclude *.pyc buildout/ s3://${AWS_S3_BUCKET}/${BUNDLE_ARCHIVE}/buildout-${TRAVIS_PYTHON_VERSION}/
- aws s3 sync --delete --exclude *.pyc --exclude lib/python${TRAVIS_PYTHON_VERSION}/site-packages/mapnik/demo ${HOME}/virtualenv/python${TRAVIS_PYTHON_VERSION}/ s3://${AWS_S3_BUCKET}/${BUNDLE_ARCHIVE}/mapnik-${TRAVIS_PYTHON_VERSION}/
after_success:
# Report coverage results to coveralls.io
- pip install coveralls
- coveralls
notifications:
email:
recipients:
- stephane.brunner@gmail.com