dist: trusty
language: node_js
sudo: required
node_js:
  - "8"
services:
  - docker
  - ntp
addons:
  chrome: stable 
  apt:
    sources:
      - google-chrome
    packages:
      - libgif-dev
      - google-chrome-stable
  hosts:
    - admin.example.com
    - login.example.com
    - single_factor.example.com
    - dev.example.com
    - home.example.com
    - mx1.mail.example.com
    - mx2.mail.example.com
    - public.example.com
    - authelia.example.com

before_install: 
  - npm install -g npm@'>=2.13.5'

before_script:
  - export DISPLAY=:99.0
  - sh -e /etc/init.d/xvfb start
  - sleep 3

script:
  - ./scripts/travis.sh

after_success:
  - ./scripts/docker-publish.sh

deploy:
  provider: npm
  email: clement.michaud34@gmail.com
  skip_cleanup: true
  api_key:
    secure: Hj09zw6uHWWRm9WtVSluy1XdISQGQWC3QElT03EuOfn6Mw/4A4Lj5pkvas+cb5y4aGdhQwaldYtKMMQKQ2ASCHcwHF780fkr+bmUjQr3BwrnJn/HsWrg1Q3jcRfY2GmI+hrDlP0/G534132EKxwDGusNSd6atDsQkkCfWDLuRZxkIqYazpanRBUI2jro65f4xX0X1mRgsBEp0gx+m0rFx/yuCkjoDoSlseEJ/NuyaR5N+JervKdrE6K3TrzJ1trnI5L00dwtgiYqlqyXaV8NMR2AOTr/vQlnnjZvkdTZGcKAFMWv3vjTecfp/Z3RW4saRR4CIJKC4JozE70+WMLqmo11br9q58zSrmKjOfkhf6FXaNHIJc/eQr3+PFzhW9DCVcNfcBh5wTVgTlLEp9845FaBdzjH40K0J4OrSnBhWDW14S7fXurTJafR6Ycxhi17vN2oEsT8XcTg2kcrnplMtt5Ylnkb4kYeVIk9cpeTvYtFjlzWPsxZhtURReY+Inbtt8nYThicqjBHHuDpBmyb0aafTYF5qQLx343KBfwFrDHPZXbglZ8Q97OAS9G0LzxkmYf+pIgW7inGsuB4CW6TPNCTZmVo6O2Ov9S4J/aXRfQSbmZa7e3gHP9pbMPhfw4P0ecpbCzRJzXrQXZcet6oIHMCqLB4qOB8KR4/IHplbaE=
  on:
    tags: true
notifications:
  email:
    recipients:
    - clement.michaud34@gmail.com
    on_success: change
    on_failure: always

