sudo: false
dist: trusty
cache: yarn
addons:
  apt:
    sources:
      - google-chrome
    packages:
      - google-chrome-stable

language: node_js
node_js: "node"

before_install:
  - export CHROME_BIN=chromium-browser
  - export DISPLAY=:99.0
  - sh -e /etc/init.d/xvfb start

before_script:
- yarn global add @angular/cli
- ng set --global packageManager=yarn

jobs:
  include:
    - stage: prepare cache
      script: echo "Preparing cache"
    - stage: test
      script: ng test -sr
    - stage: test
      script: ng e2e
    - stage: deploy
      script:
        - ng build --prod --base-href /diablo3cube/ --deploy-url https://seeker.github.io/diablo3cube/
      deploy:
        provider: pages
        skip_cleanup: true
        local_dir: dist
        github_token: $GITHUB_OAUTH_TOKEN
        on:
          branch: master

sudo: required
dist: trusty
addons:
  apt:
    sources:
      - google-chrome
    packages:
      - google-chrome-stable

language: node_js
node_js: "node"

before_install:
  - export CHROME_BIN=chromium-browser
  - export DISPLAY=:99.0
  - sh -e /etc/init.d/xvfb start

before_script:
- yarn global add @angular/cli
- ng set --global packageManager=yarn

jobs:
  include:
    - stage: test
      script: ng test -sr
    - stage: test
      script: ng e2e
    - stage: deploy
      script:
        - ng build --prod --base-href /diablo3cube/ --deploy-url https://seeker.github.io/diablo3cube/
      deploy:
        provider: pages
        skip_cleanup: true
        local_dir: dist
        github_token: $GITHUB_OAUTH_TOKEN
        on:
          branch: master

Remove cache and use sudo
Remove cache and use sudo
