os: linux
language: python
python:
  - 2.7

# no more required in travis
#sudo: required

services:
  - docker

jobs:
  include:
      script:
        - |
          if [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then
            docker run -ti --name crs-test --entrypoint /docker-entrypoint.sh -e REPO=$TRAVIS_PULL_REQUEST_SLUG -e BRANCH=$TRAVIS_PULL_REQUEST_BRANCH themiddle/crs-test
          else
            docker run -ti --name crs-test --entrypoint /docker-entrypoint.sh -e REPO=$TRAVIS_REPO_SLUG -e BRANCH=$TRAVIS_BRANCH themiddle/crs-test
          fi

# safelist
branches:
  only:
    - v3.1/dev
    - v3.2/dev
    - v3.3/dev
    - fix-travis

#notifications:
#  irc: "chat.freenode.net#modsecurity"
