message: ci: enable matrix build for Node.js versions in circleci
diff: @@ -2,7 +2,27 @@ version: 2
  jobs:
  build:
  docker:
  - - image: node:4
  + - image: node:6
  + working_directory: ~/wd
  + steps:
  + - checkout
  + - run:
  + name: Trigger Jobs
  + command: |
  + function trigger_job() {
  + job_name=$1
  + curl --user ${CIRCLE_API_TOKEN}: \
  + --data build_parameters[CIRCLE_JOB]=$job_name \
  + --data revision=$CIRCLE_SHA1 \
  + https://circleci.com/api/v1.1/project/github/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME/tree/$CIRCLE_BRANCH
  + }
  + trigger_job build-node-v4
  + trigger_job build-node-v6
  + trigger_job build-node-v7
  +
  + build-node-base: &build-node-base
  + docker:
  + - image: node
  environment:
  TEST_REPORTS: /tmp/test-reports
  working_directory: ~/wd
  @@ -15,8 +35,8 @@ jobs:
  - checkout
  - restore_cache:
  keys:
  - - v1-yarn-{{ .Branch }}
  - - v1-yarn-master
  + - v1-yarn-{{ .Branch }}-{{ .Environment.CIRCLE_JOB }}
  + - v1-yarn-master-{{ .Environment.CIRCLE_JOB }}
  - run:
  name: Install dependencies
  command: yarn install --no-lockfile
  @@ -28,8 +48,23 @@ jobs:
  # yarn run circleci
  npm run circleci
  - save_cache:
  - key: v1-yarn-{{ .Branch }}-#{{ .BuildNum }}
  + key: v1-yarn-{{ .Branch }}-{{ .Environment.CIRCLE_JOB }}-#{{ .BuildNum }}
  paths:
  - ~/.cache/yarn
  - store_test_results:
  path: /tmp/test-reports
  +
  + build-node-v4:
  + <<: *build-node-base
  + docker:
  + - image: node:4
  +
  + build-node-v6:
  + <<: *build-node-base
  + docker:
  + - image: node:6
  +
  + build-node-v7:
  + <<: *build-node-base
  + docker:
  + - image: node:7
  