language: node_js dist: trusty sudo: required node_js: - 8 before_install: - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start - sleep 3 # give xvfb some time to start - google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost & stages: - name: build-and-deploy - test jobs: include: # build and deploy test site to heroku - stage: build-and-deploy script: - npm run build before_deploy: 'cd e2e/site' deploy: provider: heroku api_key: secure: jpFS7uqKMrcETZNqcBcAjN3S7DSTOvF510LrPngWlO6dD8bSjW4XRYZBXVn9SHKtXnPTznAAli+nwPy4pj35zlehk7mWwLCwOlcv5ZyIulXCjzw7W4DBUq/BLYZqUvYznZGXJ2X84dv9Xccl20FKSEZDQy8o7BUo2+LWo4Vn6rpACqgc2BQkMf+ASnGGsZXwaw+FpjjNES6OngIcCEWAgHGxEcJeZZjDs9YtIG+U40As3udL2Gd1LMkbtH0b5XUO1+JzWqC5EzVY31aZG6W3fG6C36zU5dzP5X51jKa2pMaCaqY5Hk68orDx/jYSSg26/dwtSwqnkgTc4eMpC4bjDAth+LKUbzsVe6cMBSxtHOMA1KuEY7tNZfNE3v0WPBKQR4bVcEyoGjqwR9ymAvTC9poqfC+48sYYUxT+xoRZgT+E8qzS8rJdqtC34LeLhRwPPQpInGb3HKpUxuIcDHmVB10iU0ZKMzg5TUoqbLPyDjiRTtOPExnbLhMEEVBjqHfIpzsf+YKNMgoeqU4wFtu3Z22IIcf6OuN3sUWuDcosQ6FrnLguo4ktGbVIFLD5Rc4N7NMemJqQe9C4amDU6dtW5krnarFCM0X9BVAuqvHWmoyo2ibTQZikx3QzI9RrUThOqwjVd+QUKL4Fln9k+fiKQWMIzdp3CiHR9kcjeWkZ2vc= skip_cleanup: true app: angular-infinite-scroller on: all_branches: true # unit tests - stage: test script: - npm run test env: COMMAND=test:unit after_success: 'npm run coveralls' # end-to-end tests - stage: test before_script: 'npm run webdriver-update' script: - npm run e2e:travis env: COMMAND=test:e2e notifications: email: false addons: chrome: stable