.travis.yml

Summary

Maintainability
Test Coverage
git:
  depth: 5
language: node_js
cache:
  yarn: true

os: linux

env:
  global:
    - PATH=$HOME/.yarn/bin:$PATH
    - JOB=test

install: skip
before_script:
  - if [ "$TRAVIS_OS_NAME" = "windows" ]; then choco install make; fi

script:
  - if [ "$JOB" = "test" ]; then make -j test-ci; fi
  - if [ "$JOB" = "lint" ]; then make -j code-quality-ci; fi
  - if [ "$JOB" = "babel-parser-flow-tests" ]; then make -j test-flow-ci; fi
  - if [ "$JOB" = "babel-parser-typescript-tests" ]; then make -j test-typescript-ci; fi
  - if [ "$JOB" = "babel-parser-test262-tests" ]; then make -j test-test262-ci; fi

matrix:
  fast_finish: true
  include:
    - node_js: "node"
      env: JOB=lint
    # We test the latest version on circleci
    - node_js: "13"
    # Move `windows` build to be the third since it is slow
    - os: windows
      # Pin windows node.js version until https://github.com/nodejs/node/issues/33166 is resolved
      node_js: "14.0"
      env:
        - JOB=test
        # https://travis-ci.community/t/build-doesnt-finish-after-completing-tests/288/9
        - YARN_GPG=no
      cache:
        yarn: true
        directories:
          - $HOME/AppData/Local/Temp/chocolatey
    # Continue node_js matrix
    - node_js: "6"
    - node_js: "12"
    - node_js: "10"
    - node_js: "8"
    - node_js: "node"
      env: JOB=babel-parser-flow-tests
    - node_js: "node"
      env: JOB=babel-parser-typescript-tests
    - node_js: "node"
      env: JOB=babel-parser-test262-tests

notifications:
  slack:
    on_success: change
    on_failure: always
    rooms:
      # Generate with
      #     travis encrypt "babeljs:<token>#activity" --add notifications.slack.rooms
      # where <token> is from the Slack integration settings.
      secure: SrwPKRe2AiNAKRo/+2yW/x4zxbWf2FBXuBuuPkdTJVTpWe++Jin1lXYJWTKP1a1i/IbmhffBO9YZcUFbeuXJpRM083vO8VYpyuBMQRqWD+Z3o+ttPlHGOJgnj0nkIcGRk6k7PpyHNnIkixfEJDvbbg9lN1Jswb3xkL8iYIHpuFE=

branches:
  except:
    - /^v\d+\.\d+\.\d+$/