Skip to content

Commit 7e3d0bf

Browse files
committed
init circleci
1 parent d1b38c4 commit 7e3d0bf

File tree

2 files changed

+55
-1
lines changed

2 files changed

+55
-1
lines changed

.circleci/config.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
version: 2
2+
3+
defaults: &defaults
4+
docker:
5+
- image: circleci/node:10.16
6+
working_directory: ~/project
7+
8+
jobs:
9+
install-dependencies:
10+
<<: *defaults
11+
steps:
12+
- checkout
13+
- attach_workspace:
14+
at: ~/project
15+
- restore_cache:
16+
keys:
17+
- v1-dependencies-{{ checksum "package.json" }}
18+
- v1-dependencies-
19+
- run: |
20+
yarn install --frozen-lockfile
21+
- save_cache:
22+
key: v1-dependencies-{{ checksum "package.json" }}
23+
paths: node_modules
24+
- persist_to_workspace:
25+
root: .
26+
paths: .
27+
lint-and-typecheck:
28+
<<: *defaults
29+
steps:
30+
- attach_workspace:
31+
at: ~/project
32+
- run: |
33+
yarn tslint
34+
unit-tests:
35+
<<: *defaults
36+
steps:
37+
- attach_workspace:
38+
at: ~/project
39+
- run: |
40+
yarn test --coverage
41+
42+
workflows:
43+
version: 2
44+
build-and-test:
45+
jobs:
46+
- install-dependencies
47+
- lint-and-typecheck:
48+
requires:
49+
- install-dependencies
50+
- unit-tests:
51+
requires:
52+
- install-dependencies

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
"license": "MIT",
1313
"scripts": {
1414
"build": "tsc -p .",
15-
"build:watch": "tsc --watch -p ."
15+
"build:watch": "tsc --watch -p .",
16+
"tslint": "tsc --noEmit",
17+
"test": "jest"
1618
},
1719
"publishConfig": {
1820
"registry": "https://registry.npmjs.org/"

0 commit comments

Comments
 (0)