message: chore: use a matrix to simplify test-node in CircleCI
diff: +version: 2.1
  +
  aliases:
  - &filter-ignore-gh-pages
  branches:
  @@ -11,85 +13,62 @@ aliases:
  orbs:
  node: circleci/node@4.0.0
  -version: 2.1
  -jobs:
  - test-node-10:
  - working_directory: ~/jest
  - executor: node/default
  - steps:
  - - checkout
  - - node/install:
  - node-version: '10'
  - install-npm: false
  - - node/install-packages: *install
  - - run:
  - command: yarn test-ci-partial
  - - store_test_results:
  - path: reports/junit
  - test-jest-jasmine:
  +jobs:
  + test-node:
  + parameters:
  + node-version:
  + type: string
  + partial:
  + type: boolean
  + default: false
  working_directory: ~/jest
  executor: node/default
  steps:
  - checkout
  - node/install:
  - lts: true
  + node-version: << parameters.node-version >>
  install-npm: false
  - node/install-packages: *install
  - - run:
  - command: JEST_JASMINE=1 yarn test-ci-partial && JEST_JASMINE=1 yarn test-leak
  - - store_test_results:
  - path: reports/junit
  -
  - test-node-12:
  - working_directory: ~/jest
  - executor: node/default
  + - when:
  + condition: << parameters.partial >>
  steps:
  - - checkout
  - - node/install:
  - node-version: '12'
  - install-npm: false
  - - node/install-packages: *install
  - run:
  command: yarn test-ci-partial
  - - store_test_results:
  - path: reports/junit
  -
  - test-node-14:
  - working_directory: ~/jest
  - executor: node/default
  + - unless:
  + condition: << parameters.partial >>
  steps:
  - - checkout
  - - node/install:
  - node-version: '14'
  - install-npm: false
  - - node/install-packages: *install
  - run:
  command: yarn test-ci
  - store_test_results:
  path: reports/junit
  - test-node-15:
  + test-jest-jasmine:
  working_directory: ~/jest
  executor: node/default
  steps:
  - checkout
  - node/install:
  - node-version: '15'
  + lts: true
  install-npm: false
  - node/install-packages: *install
  - run:
  - command: yarn test-ci-partial
  + command: JEST_JASMINE=1 yarn test-ci-partial && JEST_JASMINE=1 yarn test-leak
  - store_test_results:
  path: reports/junit
  # Workflows enables us to run multiple jobs in parallel
  workflows:
  - version: 2
  build-and-deploy:
  jobs:
  - - test-node-10
  - - test-node-12
  - - test-node-14
  - - test-node-15 # current
  + - test-node:
  + matrix:
  + parameters:
  + node-version: ['14']
  + - test-node:
  + name: test-node-partial-<< matrix.node-version >>
  + partial: true
  + matrix:
  + parameters:
  + node-version: ['10', '12', '15']
  - test-jest-jasmine
  