Skip to content
This repository was archived by the owner on Oct 3, 2023. It is now read-only.

Commit 818ba2e

Browse files
authored
chore: start testing on circleci (#6)
PR-URL: #6
1 parent edd8845 commit 818ba2e

3 files changed

Lines changed: 73 additions & 6 deletions

File tree

.circleci/config.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
---
2+
release_tags: &release_tags
3+
tags:
4+
only: /^v\d+(\.\d+){2}(-.*)?$/
5+
6+
# "Include" for unit tests definition.
7+
unit_tests: &unit_tests
8+
steps:
9+
- checkout
10+
- run:
11+
name: Install modules and dependencies.
12+
command: npm install
13+
- run:
14+
name: Run unit tests.
15+
command: npm run test
16+
17+
version: 2.0
18+
workflows:
19+
version: 2
20+
tests:
21+
jobs:
22+
- node6:
23+
filters: *release_tags
24+
- node8:
25+
filters: *release_tags
26+
- node9:
27+
filters: *release_tags
28+
- publish_npm:
29+
requires:
30+
- node6
31+
- node8
32+
- node9
33+
filters:
34+
branches:
35+
ignore: /.*/
36+
<<: *release_tags
37+
38+
jobs:
39+
node6:
40+
docker:
41+
- image: node:6
42+
user: node
43+
<<: *unit_tests
44+
node8:
45+
docker:
46+
- image: node:8
47+
user: node
48+
<<: *unit_tests
49+
node9:
50+
docker:
51+
- image: node:9
52+
user: node
53+
<<: *unit_tests
54+
publish_npm:
55+
docker:
56+
- image: node:8
57+
user: node
58+
steps:
59+
- checkout
60+
- run:
61+
name: Set NPM authentication.
62+
command: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
63+
- run:
64+
name: Install modules and dependencies.
65+
command: npm install
66+
- run:
67+
name: Publish the module to npm.
68+
command: npm publish

package.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
"types": "build/src/index.d.ts",
77
"repository": "census-instrumentation/opencensus-node",
88
"scripts": {
9-
"postinstall": "npm run bootstrap;npm run build;",
10-
"build": "node_modules/.bin/lerna run build",
11-
"test": "node_modules/.bin/lerna run test",
12-
"bootstrap": "node_modules/.bin/lerna bootstrap",
13-
"bump": "node_modules/.bin/lerna publish"
9+
"postinstall": "npm run bootstrap",
10+
"compile": "lerna run compile",
11+
"test": "lerna run test",
12+
"bootstrap": "lerna bootstrap",
13+
"bump": "lerna publish"
1414
},
1515
"keywords": [
1616
"opencensus",

packages/opencensus-core/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
"types": "build/src/index.d.ts",
77
"repository": "census-instrumentation/opencensus-node",
88
"scripts": {
9-
"build": "node_modules/.bin/tsc --declaration",
109
"test": "nyc -x '**/test/**' --reporter=html --reporter=text mocha 'build/test/**/*.js'",
1110
"clean": "rimraf build/*",
1211
"check": "gts check",

0 commit comments

Comments
 (0)