Skip to content

Commit ee113b1

Browse files
authored
Add .circleci/config.yml (#154)
1 parent 5e56558 commit ee113b1

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

.circleci/config.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
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/[email protected]
10+
11+
12+
jobs:
13+
# Below is the definition of your job to build and test your app, you can rename and customize it as you want.
14+
build-and-test:
15+
# These next lines define a Docker executor: https://circleci.com/docs/2.0/executor-types/
16+
# You can specify an image from Dockerhub or use one of our Convenience Images from CircleCI's Developer Hub.
17+
# A list of available CircleCI Docker Convenience Images are available here: https://circleci.com/developer/images/image/cimg/node
18+
docker:
19+
- image: cimg/node:15.1
20+
# Then run your tests!
21+
# CircleCI will report the results back to your VCS provider.
22+
steps:
23+
# Checkout the code as the first step.
24+
- checkout
25+
# Next, the node orb's install-packages step will install the dependencies from a package.json.
26+
# The orb install-packages step will also automatically cache them for faster future runs.
27+
- node/install-packages
28+
# If you are using yarn instead npm, remove the line above and uncomment the two lines below.
29+
# - node/install-packages:
30+
# pkg-manager: yarn
31+
- run:
32+
name: Run tests
33+
command: npm test
34+
35+
workflows:
36+
# Below is the definition of your workflow.
37+
# Inside the workflow, you provide the jobs you want to run, e.g this workflow runs the build-and-test job above.
38+
# CircleCI will run this workflow on every commit.
39+
# For more details on extending your workflow, see the configuration docs: https://circleci.com/docs/2.0/configuration-reference/#workflows
40+
sample:
41+
jobs:
42+
- build-and-test
43+
# 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.
44+
# - node/test

0 commit comments

Comments
 (0)