[travis] set up travis accordingly.
sudo: required
language: python
+cache:
+ directories:
+ - $home/.cache/pip
+ - $home/dd-agent
+ - vendor/cache
python:
- "2.7"
+git:
+ depth: 3
+
branches:
only:
- master
- - /jaime.*/ # for now - whitelisting
- - /tristan.*/ # for now - whitelisting
services:
- docker
+matrix:
+ fast_finish: true
+
env:
global:
- - NOSE_FILTER="not windows"
+ - NOSE_FILTER="not windows and not fixme"
- VOLATILE_DIR=/tmp/integration-sdk-testing
- SKIP_CLEANUP=true
- INTEGRATIONS_DIR=$HOME/embedded
- PIP_CACHE=$HOME/.cache/pip
- SDK_TESTING=true
+ - BUNDLE_PATH=$TRAVIS_BUILD_DIR/vendor/cache
+ - DD_AGENT_BRANCH=master
+ matrix:
+ - TRAVIS_FLAVOR=default
+ # END OF TRAVIS MATRIX
before_install:
- sudo apt-get update ; sudo apt-get install -y curl apt-transport-https git
install:
- - gem install bundler
- bundle install
- - git clone https://github.com/DataDog/dd-agent.git ~/dd-agent
+ - bundle package
+ - git -C $HOME/dd-agent pull || git clone -b $DD_AGENT_BRANCH --depth 1 https://github.com/DataDog/dd-agent.git $HOME/dd-agent
- echo "$HOME/dd-agent/" > $(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")/datadog-agent.pth
- - pip install docker-compose
+ - pip install 'docker-compose==1.9.0'
- pip install pylint
- if [ -e $TRAVIS_BUILD_DIR/requirements.txt ]; then pip install -r $TRAVIS_BUILD_DIR/requirements.txt; fi
- if [ -e $TRAVIS_BUILD_DIR/requirements-test.txt ]; then pip install -r $TRAVIS_BUILD_DIR/requirements-test.txt; fi
- if [ -e $TRAVIS_BUILD_DIR/requirements-opt.txt ]; then pip install -r $TRAVIS_BUILD_DIR/requirements-opt.txt; fi
- if [ -e ~/dd-agent/requirements.txt ]; then pip install -r ~/dd-agent/requirements.txt; fi
- - if [ -e $TRAVIS_BUILD_DIR/Gemfile ]; then cd $TRAVIS_BUILD_DIR ; bundle install; cd - ; fi
script:
- - bundle exec rake lint
- - rake ci:run[default]
+ - bundle exec rake prep_travis_ci
+ - rake ci:run
- bundle exec rake requirements
+# we should clean generated files before we save the cache
+# We don't want to save .pyc files
+# Since clobber only cleans the project directory,
+# everything outside of it should be cleaned, too, so we'll use find and -delete
+before_cache:
+ - rake clobber
+ - find $HOME/.cache/pip $HOME/dd-agent -name *.pyc -delete
+
after_script:
- if [[ $(docker ps -a -q) ]]; then docker stop $(docker ps -a -q); fi
