config.yml 642 B

12345678910111213141516171819202122232425
  1. # CircleCI configuration file
  2. version: 2.1
  3. jobs:
  4. build_and_test:
  5. docker:
  6. - image: cimg/node:16.11.1
  7. steps:
  8. - checkout
  9. # look for existing cache and restore if found
  10. - restore_cache:
  11. key: v1-deps-{{ checksum "package-lock.json" }}
  12. # install dependencies
  13. - run:
  14. name: install dependencies
  15. command: npm install
  16. # save any changes to the cache
  17. - save_cache:
  18. key: v1-deps-{{ checksum "package-lock.json" }}
  19. paths:
  20. - node_modules
  21. # run test suite
  22. - run:
  23. name: test
  24. command: npm run test