version: 2.1
jobs:
  build_and_test:
    docker:
      - image: circleci/node:16
    steps:
      - checkout
      - run:
          name: npm install
          command: npm install
      - run:
          name: Run Tests
          command: npm test
      - run:
          name: Build From Source
          command: npm run build

workflows:
  version: 2
  build_and_deploy:
    jobs:
      - build_and_test