matrix:
  include:
  - language: python
    name: Project lint, generation tests and build
    python:
      - "2.7"
    install:
      - python -m pip install --requirement tools/generation/requirements.txt
      - python -m pip install --requirement tools/lint/requirements.txt
    script:
      - ./tools/scripts/ci_build.sh
      - ./tools/generation/test/run.py
      - ./tools/lint/test/run.py
      - ./tools/scripts/ci_lint.sh
    after_success:
      - ./tools/scripts/deploy.sh
  - language: node_js
    name: "New or modified tests on SpiderMonkey"
    if: type = pull_request
    node_js: "node"
    script: ./tools/scripts/ci_test.sh
    env: T262ENGINE=spidermonkey hostType=jsshell
  - language: node_js
    name: "New or modified tests on V8"
    if: type = pull_request
    node_js: "node"
    script: ./tools/scripts/ci_test.sh
    env: T262ENGINE=v8 hostType=d8
  - language: node_js
    name: "New or modified tests on V8 with --harmony"
    if: type = pull_request
    node_js: "node"
    script: ./tools/scripts/ci_test.sh
    env: T262ENGINE=v8 hostType=d8 hostArgs='--harmony'
  - language: node_js
    name: "New or modified tests on ChakraCore"
    if: type = pull_request
    node_js: "node"
    script: ./tools/scripts/ci_test.sh
    env: T262ENGINE=chakra hostType=ch
  - language: node_js
    name: "New or modified tests on JavaScriptCore"
    if: type = pull_request
    node_js: "node"
    script: ./tools/scripts/ci_test.sh
    env: T262ENGINE=javascriptcore hostType=jsc
  - language: node_js
    name: "New or modified tests on Node"
    if: type = pull_request
    node_js: "node"
    script: ./tools/scripts/ci_test.sh
    env: T262ENGINE=node hostType=node
notifications:
  email:
    on_failure: always