Last active
          July 12, 2022 04:01 
        
      - 
      
- 
        Save kenberkeley/43978179c6f93db6e97d39a77178203b to your computer and use it in GitHub Desktop. 
    The simplest CircleCI 2.1 config example for Node / JS projects
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | ## References: | |
| # https://git.io/Jf3l9 | |
| # https://circleci.com/docs/2.0/yarn/ | |
| # https://circleci.com/docs/2.0/caching/#yarn-node | |
| # https://circleci.com/orbs/registry/orb/circleci/node | |
| # https://discuss.circleci.com/t/circleci-2-1-config-overview/26057 | |
| version: 2.1 | |
| orbs: | |
| node: circleci/[email protected] | |
| commands: | |
| setup-node-and-yarn-install-with-cache: | |
| steps: | |
| - node/install: | |
| install-yarn: true | |
| node-version: latest | |
| - node/install-packages: | |
| pkg-manager: yarn | |
| cache-key: yarn.lock | |
| jobs: | |
| lint-and-test: | |
| executor: | |
| name: node/default | |
| steps: | |
| - checkout | |
| - setup-node-and-yarn-install-with-cache | |
| - run: | |
| name: Lint | |
| command: npm run lint | |
| - run: | |
| name: Check types | |
| command: npm run check-types | |
| - run: | |
| name: Run tests | |
| command: npm run test | |
| workflows: | |
| run-ci: | |
| jobs: | |
| - lint-and-test | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
            
https://circleci.com/developer/orbs/orb/circleci/node
Maybe we could see the default orbs provider: