branches:
  only:
    - master
    - /^release-.+/
    - /^v\d+\.\d+\.\d+/

language: node_js
node_js:
  - 8

cache: yarn

before_install:
  - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.10.1
  - export PATH="$HOME/.yarn/bin:$PATH"

jobs:
  fast_finish: true
  include:
    - name: Tests (Chrome)

      addons:
        chrome: stable

      script:
        - yarn test

    - name: Tests (Node.js)

      env:
        - NODE_PATH=dist

      script:
        - yarn test:node

    - name: Tests (Browser)
      env:
        - BROWSERSTACK_USERNAME=glimmervm1
        - BROWSERSTACK_ACCESS_KEY=7DFjbGLxYRsXWmc8tzeh

      before_script:
        - yarn browserstack:connect

      script:
        - yarn test:browserstack
        - yarn browserstack:results

      after_script:
        - yarn browserstack:disconnect

    - name: Type Tests

      script:
        - yarn build
        - yarn test:types

    - name: Linting

      script:
        - yarn problems
        - yarn eslint
    # Temporarily disabling the smoke test as it is causing timeouts on Travis
    # - name: Smoke Test
    #   addons:
    #     chrome: stable
    #   script:
    #     - yarn test:smoke

branches:
  only:
    - master
    - /^release-.+/
    - /^v\d+\.\d+\.\d+/

language: node_js
node_js:
  - 8

cache: yarn

before_install:
  - curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.17.3
  - export PATH="$HOME/.yarn/bin:$PATH"

jobs:
  fast_finish: true
  include:
    - name: Tests (Chrome)

      addons:
        chrome: stable

      script:
        - yarn test

    - name: Tests (Node.js)

      env:
        - NODE_PATH=dist

      script:
        - yarn test:node

    - name: Tests (Browser)
      env:
        - BROWSERSTACK_USERNAME=glimmervm1
        - BROWSERSTACK_ACCESS_KEY=7DFjbGLxYRsXWmc8tzeh

      before_script:
        - yarn browserstack:connect

      script:
        - yarn test:browserstack
        - yarn browserstack:results

      after_script:
        - yarn browserstack:disconnect

    - name: Type Tests

      script:
        - yarn build
        - yarn test:types

    - name: Linting

      script:
        - yarn problems
        - yarn eslint
    # Temporarily disabling the smoke test as it is causing timeouts on Travis
    # - name: Smoke Test
    #   addons:
    #     chrome: stable
    #   script:
    #     - yarn test:smoke

Use yarn@1.17.3 in CI (match volta configuration).
Use yarn@1.17.3 in CI (match volta configuration).
