Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 0181afb

Browse files
authored
setting up circle
1 parent 9d7aea9 commit 0181afb

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

.circleci/config.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Javascript Node CircleCI 2.0 configuration file
2+
#
3+
# Check https://circleci.com/docs/2.0/language-javascript/ for more details
4+
#
5+
version: 2
6+
7+
defaults: &defaults
8+
working_directory: ~/repo
9+
docker:
10+
- image: circleci/node:8.9.1
11+
12+
jobs:
13+
test:
14+
<<: *defaults
15+
steps:
16+
- checkout
17+
18+
- restore_cache:
19+
keys:
20+
- v1-dependencies-
21+
# fallback to using the latest cache if no exact match is found
22+
- v1-dependencies-
23+
24+
- run: npm install
25+
- run:
26+
name: Run tests
27+
command: npm test
28+
29+
- save_cache:
30+
paths:
31+
- node_modules
32+
key: v1-dependencies-
33+
34+
- persist_to_workspace:
35+
root: ~/repo
36+
paths: .
37+
deploy:
38+
<<: *defaults
39+
steps:
40+
- attach_workspace:
41+
at: ~/repo
42+
- run:
43+
name: Authenticate with registry
44+
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/repo/.npmrc
45+
- run:
46+
name: Publish package
47+
command: npm publish
48+
49+
workflows:
50+
version: 2
51+
test-deploy:
52+
jobs:
53+
- test:
54+
filters:
55+
tags:
56+
only: /^v.*/
57+
- deploy:
58+
requires:
59+
- test
60+
filters:
61+
tags:
62+
only: /^v.*/
63+
branches:
64+
ignore: /.*/

0 commit comments

Comments
 (0)