1+ # Use the latest 2.1 version of CircleCI pipeline process engine.
2+ # See: https://circleci.com/docs/2.0/configuration-reference
3+ version : 2.1
4+
5+ orbs :
6+ # The Node.js orb contains a set of prepackaged CircleCI configuration you can utilize
7+ # Orbs reduce the amount of configuration required for common tasks.
8+ # See the orb documentation here: https://circleci.com/developer/orbs/orb/circleci/node
9+ node : circleci/node@4.7
10+
11+ jobs :
12+ # Below is the definition of your job to build and test your app, you can rename and customize it as you want.
13+ build-and-test :
14+ # These next lines define a Docker executor: https://circleci.com/docs/2.0/executor-types/
15+ # You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub.
16+ # A list of available CircleCI Docker Convenience Images are available here: https://circleci.com/developer/images/image/cimg/node
17+ docker :
18+ - image : cimg/node:16.10
19+ # Then run your tests!
20+ # CircleCI will report the results back to your VCS provider.
21+ steps :
22+ # Checkout the code as the first step.
23+ - checkout
24+ # Next, the node orb's install-packages step will install the dependencies from a package.json.
25+ # The orb install-packages step will also automatically cache them for faster future runs.
26+ - node/install-packages :
27+ # If you are using yarn, change the line below from "npm" to "yarn"
28+ pkg-manager : npm
29+ - run :
30+ name : Run Ci
31+ command : npm ci
32+ - run :
33+ name : Run build
34+ command : npm run build --if-present
35+
36+ workflows :
37+ # Below is the definition of your workflow.
38+ # Inside the workflow, you provide the jobs you want to run, e.g this workflow runs the build-and-test job above.
39+ # CircleCI will run this workflow on every commit.
40+ # For more details on extending your workflow, see the configuration docs: https://circleci.com/docs/2.0/configuration-reference/#workflows
41+ sample :
42+ jobs :
43+ - build-and-test
44+ # For running simple node tests, you could optionally use the node/test job from the orb to replicate and replace the job above in fewer lines.
45+ # - node/test
0 commit comments