### ----------------------------------------------------
### -- Bailador
### -- Licenses: MIT
### -- Authors: Tadeusz “tadzik” Sośnierz, Anthony Parsons, Carl Masak, Gabor Szabo, GlitchMr, Moritz Lenz, Panu Ervamaa, Paul Cochrane, Solomon Foster, Sterling Hanenkamp, Tobias Leich, ugexe, vendethiel, Martin Barth (ufobat), Emeric Fischer, Julien Simonet (jsimonet)
### -- File: .travis.yml
### ----------------------------------------------------
language: generic

services:
    - docker
env:
    - AUTHOR_TESTING=1

install:
    - docker build -t bailador/bailador .
    - docker run -d -e 'AUTHOR_TESTING=1' --volume=$(pwd):/srv --name bailador-test bailador/bailador /bin/sleep infinity
    #- docker exec -it bailador-test zef --verbose install .
    - docker exec -it bailador-test zef --verbose --deps-only install .
    
script:
    - docker exec -it bailador-test prove6 -l -v xt
    - docker exec -it bailador-test prove6 -l -v t
    
after_success:
    - docker stop bailador-test
    - docker rm bailador-test

    - if [ "$TRAVIS_BRANCH" == "master" ]; then
          docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
          docker push bailador/bailador;
      fi
notifications:
    slack: perl6-bailador:FuFG55nk94k5BSOeGMNO5nDh


