Skip to content

Commit 1d7c7d7

Browse files
committed
ci: switching to circleci
1 parent 00b7286 commit 1d7c7d7

File tree

5 files changed

+85
-108
lines changed

5 files changed

+85
-108
lines changed

.circleci/config.yml

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
version: 2.1
2+
3+
orbs:
4+
node: circleci/[email protected]
5+
coveralls: coveralls/[email protected]
6+
7+
jobs:
8+
build-and-test:
9+
docker:
10+
- image: circleci/node:lts
11+
- image: rethinkdb:latest
12+
working_directory: ~/circleci-build
13+
steps:
14+
- checkout
15+
- run:
16+
name: install dockerize
17+
command: wget https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz && sudo tar -C /usr/local/bin -xzvf dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz && rm dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz
18+
environment:
19+
DOCKERIZE_VERSION: v0.3.0
20+
- run:
21+
name: Wait for mongo
22+
command: dockerize -wait tcp://localhost:28015 -timeout 1m
23+
- node/with-cache:
24+
steps:
25+
- run: npm install
26+
- run: npm run ci
27+
- persist_to_workspace:
28+
root: /home/circleci
29+
paths:
30+
- circleci-build
31+
- coveralls/upload
32+
33+
deploy:
34+
docker:
35+
- image: circleci/node:lts
36+
working_directory: ~/circleci-build
37+
steps:
38+
- attach_workspace:
39+
at: /home/circleci
40+
- run:
41+
name: Publish to NPM
42+
command: |
43+
npm set //registry.npmjs.org/:_authToken=$NPM_TOKEN
44+
npm publish
45+
46+
workflows:
47+
build-and-test:
48+
jobs:
49+
- build-and-test:
50+
filters:
51+
tags:
52+
only: /^v.*/
53+
- deploy:
54+
context: connectors
55+
requires:
56+
- build-and-test
57+
filters:
58+
tags:
59+
only: /^v.*/
60+
branches:
61+
ignore: /.*/

.travis.yml

Lines changed: 0 additions & 58 deletions
This file was deleted.

appveyor.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

package-lock.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"lint:fix": "npm run lint -- --fix",
1010
"test": "mocha --opts mocha.opts 'test/*.spec.ts'",
1111
"coverage": "nyc mocha --exit",
12-
"ci": "npm run coverage",
12+
"ci": "npm run tsc && npm run coverage",
1313
"docker": "docker run -p 28015:28015 rethinkdb:2.3.6"
1414
},
1515
"repository": {
@@ -28,6 +28,7 @@
2828
},
2929
"devDependencies": {
3030
"@deepstream/protobuf": "^1.0.0",
31+
"@types/chai": "^4.2.11",
3132
"@types/mocha": "^5.2.7",
3233
"@types/node": "^12.6.8",
3334
"@types/rethinkdb": "^2.3.14",
@@ -37,5 +38,21 @@
3738
"nyc": "^13.3.0",
3839
"tslint": "^5.18.0",
3940
"typescript": "^3.5.2"
41+
},
42+
"nyc": {
43+
"include": [
44+
"src/*.ts"
45+
],
46+
"extension": [
47+
".ts"
48+
],
49+
"require": [
50+
"ts-node/register/transpile-only"
51+
],
52+
"reporter": [
53+
"lcov"
54+
],
55+
"sourceMap": true,
56+
"instrument": true
4057
}
4158
}

0 commit comments

Comments
 (0)