language: node_js
node_js: "lts/*"
cache: yarn
before_script:
  - export DISPLAY=:99.0
  - sh -e /etc/init.d/xvfb start
addons:
  firefox: 'latest'
  apt:
    sources:
      - ubuntu-toolchain-r-test
stages:
  - build
  - lint
  - test
  - docs
script: skip
jobs:
  include:
  - stage: build
    script: yarn build
    name: "Build"
  - stage: lint
    script: yarn lint
    name: "Lint"
  - stage: test
    name: "Browser"
    script: yarn test:browser
  - script: yarn test:node
    name: "Node.js"
  - script: yarn test:webworker
    name: "Service Worker"
  - stage: docs
    name: "Coverage"
    script: yarn coverage:publish
  - script: yarn docs
    name: "API Docs"
