os:
    - linux
services:
    - docker
language: node_js
node_js:
    - "8.11.1"
jdk:
    - oraclejdk8
cache:
    directories:
        - $HOME/.m2
        - $HOME/.gradle
        - $HOME/.yarn-cache
env:
    global:
        - SPRING_OUTPUT_ANSI_ENABLED=ALWAYS
before_install:
    - java -version
    - sudo /etc/init.d/mysql stop
    - sudo /etc/init.d/postgresql stop
    - export DISPLAY=:99.0
    - sh -e /etc/init.d/xvfb start
    - npm install -g npm
    - npm install -g yarn
    - yarn global add yo
install:
    - yarn install
    - yarn link
    - gulp eslint
    - gulp test
script:
    # - git clone https://github.com/jhipster/jhipster-sample-app-ng2.git
    # - cd jhipster-sample-app-ng2
    - git clone https://github.com/pascalgrimaud/jhipster-5-sample-app.git
    - cd jhipster-5-sample-app
    - yarn install
    - yarn link generator-jhipster-primeng-charts
    - yo jhipster-primeng-charts --default --force
    # need to re-activate for next version of JHipster
    # - yarn lint
    - ./mvnw &
    - sleep 40
    - yarn e2e

os:
    - linux
services:
    - docker
language: node_js
node_js:
    - "8.11.1"
jdk:
    - oraclejdk8
addons:
  apt:
    sources:
      - google-chrome
    packages:
      - google-chrome-stable
cache:
    directories:
        - $HOME/.m2
        - $HOME/.gradle
env:
    global:
        - SPRING_OUTPUT_ANSI_ENABLED=ALWAYS
before_install:
    - java -version
    - sudo /etc/init.d/mysql stop
    - sudo /etc/init.d/postgresql stop
    # Use this for Protractor
    - export DISPLAY=:99.0
    - sh -e /etc/init.d/xvfb start
    # Install Yarn
    - curl -o- -L https://yarnpkg.com/install.sh | bash
    - export PATH=$HOME/.yarn/bin:$PATH
    - yarn -v
    - yarn global add yo
install:
    - yarn install
    - yarn link
    - gulp eslint
    - gulp test
script:
    # - git clone https://github.com/jhipster/jhipster-sample-app-ng2.git
    # - cd jhipster-sample-app-ng2
    - git clone https://github.com/pascalgrimaud/jhipster-5-sample-app.git
    - cd jhipster-5-sample-app
    - yarn install
    - yarn link generator-jhipster-primeng-charts
    - yo jhipster-primeng-charts --default --force
    # need to re-activate for next version of JHipster
    # - yarn lint
    - ./mvnw package
    - ./mvnw &
    - sleep 60
    - yarn e2e

Fix Travis by installing Google Chrome and compile the project before e2e
Fix Travis by installing Google Chrome and compile the project before e2e
