language: node_js
cache: npm

matrix:
  include:
    - os: linux
      addons:
        chrome: stable
      node_js: 8.6
    - os: linux
      addons:
        chrome: stable
      node_js: node  # Latest
    - os: windows
      addons:
        grep: stable
      filter_secrets: false  # Secrets will otherwise break Windows builds
      node_js: 8.6
      script: npx run-s pretest test:ava
      env:
        - THREADS_WORKER_INIT_TIMEOUT=30000
    - os: windows
      addons:
        grep: stable
      filter_secrets: false  # Secrets will otherwise break Windows builds
      node_js: latest
      script: npx run-s pretest test:ava

env:
  - THREADS_WORKER_INIT_TIMEOUT=15000

# https://github.com/google/EarlGrey/pull/383/files/3b38a5dea36a88aba42a42931e77a7c5429a1837
before_install:
  - |
    if ! git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(.md)|(.png)|(.pdf)|(.html)|^(LICENSE)|^(docs)'
    then
      echo "Only doc files were updated, not running the CI."
      exit
    fi

script:
  - npm test

language: node_js
cache: npm

matrix:
  include:
    - os: linux
      addons:
        chrome: stable
      node_js: 8.6
    - os: linux
      addons:
        chrome: stable
      node_js: node  # Latest
    - os: windows
      addons:
        grep: stable
      filter_secrets: false  # Secrets will otherwise break Windows builds
      node_js: 8.6
      script: npx run-s pretest test:ava
      env:
        - THREADS_WORKER_INIT_TIMEOUT=30000
    - os: windows
      addons:
        grep: stable
      filter_secrets: false  # Secrets will otherwise break Windows builds
      node_js: latest
      script: npx run-s pretest test:ava

env:
  - THREADS_WORKER_INIT_TIMEOUT=15000

script:
  - npm test

Stop detection of docs-only changes in CI
Stop detection of docs-only changes in CI

Broken, since it always skipped tests now.
