version: 2.1
orbs:
  node: circleci/node@4.7
jobs:
  lintandcoverage:
    docker:
      - image: cimg/node:16.13.2
    steps:
      - checkout
      - run: npm install
      - run: npm run lint
      - run: npm run test
      - run: npm run coveralls
workflows:
  test:
    jobs:
      - lintandcoverage
      - node/test:
          version: '12.22.6'
          pkg-manager: npm
      - node/test:
          version: '14.19.0'
          pkg-manager: npm
      - node/test:
          version: '15.14.0'
          pkg-manager: npm
      - node/test:
          version: '16.13.2'
          pkg-manager: npm
      - node/test:
          version: '17.4.0'
          pkg-manager: npm
