sudo: false # Stop annoying sudo warnings from travis

language: node_js
node_js:
  - v7 # Current
  - v6 # LTS
# - v4 # Maintentance, not used by our version of Electron

# Native module support
# We need a C++11 compiler
env:
  - CXX=g++-4.8
addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - g++-4.8

cache:
  yarn: true
  directories:
    - node_modules

# Install what is needed for uploading coverage
before_install:
  - yarn global add codacy-coverage codecov

# Now test things
script:
  - yarn run test # Generate coverage report and test things
  - nyc report --reporter=lcov > coverage.lcov && codecov
  - nyc report --reporter=text-lcov | codacy-coverage

before_deploy:
  - yarn run build # Transpile
  - yarn run docs # Generate docs

deploy:
  # Deploy to npm when new version is good
  - provider: npm
    skip_cleanup: true
    email: $NPM_EMAIL
    api_key: $NPM_API_KEY
    on:
      branch: master
      tags: true
      node: v6 # The version we use in electron

  # Update docs when new version is good
  - provider: pages
    skip_cleanup: true
    github_token: $GITHUB_TOKEN
    local_dir: docs
    on:
      branch: master
      tags: true
      node: v6 # The version we use in electron

sudo: false # Stop annoying sudo warnings from travis

language: node_js
node_js:
  - v7 # Current
  - v6 # LTS
# - v4 # Maintentance, not used by our version of Electron

# Native module support
# We need a C++11 compiler
env:
  - CXX=g++-4.8
addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - g++-4.8

cache:
  yarn: true
  directories:
    - node_modules

# Install what is needed for uploading coverage
before_install:
  - yarn global add codacy-coverage codecov

# Now test things
script:
  - yarn run test # Generate coverage report and test things
  - nyc report --reporter=lcov > coverage.lcov && codecov
  - nyc report --reporter=text-lcov | codacy-coverage

before_deploy:
  - yarn run build # Transpile
  - yarn run docs # Generate docs
  - touch docs/.nojekyll

deploy:
  # Deploy to npm when new version is good
  - provider: npm
    skip_cleanup: true
    email: $NPM_EMAIL
    api_key: $NPM_API_KEY
    on:
      branch: master
      tags: true
      node: v6 # The version we use in electron

  # Update docs when new version is good
  - provider: pages
    skip_cleanup: true
    github_token: $GITHUB_TOKEN
    local_dir: docs
    on:
      branch: master
      tags: true
      node: v6 # The version we use in electron

Create .nojekyll file inside docs
ci(Travis): Create .nojekyll file inside docs

GitHub Pages complains about failure in running Jekyll because we forgot
to disable it. The docs are up and running, so this can be released later.

[ci skip]
