language: node_js

node_js:
  - 10

## Cache NPM folder and Cypress binary
## to avoid downloading Cypress again and again
cache:
  directories:
    - ~/.npm
    - ~/.cache

install:
  # use the new "ci" command for fastest installs on CI
  - npm ci

before_script:
  ## runs the 'start' script which
  ## boots our local app server on port 8888
  ## which cypress expects to be running
  ## -----------------------------------
  ## the '-- --silent' passes arguments
  ## to http-server which silences its output
  ## else our travis logs would be cluttered
  ## with output from HTTP requests
  ## https://docs.npmjs.com/cli/start
  ## https://github.com/indexzero/http-server
  ## ---------------------------------------
  ## we use the '&' ampersand which tells
  ## travis to run this process in the background
  ## else it would block execution and hang travis
  #- npm start -- --silent &

script:
  ## now run cypress headlessly
  ## and record all of the tests.
  ## Cypress will search for a
  ## CYPRESS_RECORD_KEY environment
  ## variable by default and apply
  ## this to the run.
  - npm run cypress_ci

  ## alternatively we could specify
  ## a specific record key to use
  ## like this without having to
  ## configure environment variables
  ## - cypress run --record --key <your_record_key>
  
language: node_js

node_js:
  - 12

## Cache NPM folder and Cypress binary
## to avoid downloading Cypress again and again
cache:
  directories:
    - ~/.npm
    - ~/.cache

install:
  # use the new "ci" command for fastest installs on CI
  - npm ci

before_script:
  ## runs the 'start' script which
  ## boots our local app server on port 8888
  ## which cypress expects to be running
  ## -----------------------------------
  ## the '-- --silent' passes arguments
  ## to http-server which silences its output
  ## else our travis logs would be cluttered
  ## with output from HTTP requests
  ## https://docs.npmjs.com/cli/start
  ## https://github.com/indexzero/http-server
  ## ---------------------------------------
  ## we use the '&' ampersand which tells
  ## travis to run this process in the background
  ## else it would block execution and hang travis
  #- npm start -- --silent &

script:
  ## now run cypress headlessly
  ## and record all of the tests.
  ## Cypress will search for a
  ## CYPRESS_RECORD_KEY environment
  ## variable by default and apply
  ## this to the run.
  - npm run cypress_ci

  ## alternatively we could specify
  ## a specific record key to use
  ## like this without having to
  ## configure environment variables
  ## - cypress run --record --key <your_record_key>
  
Update CI node version to 12
Update CI node version to 12
