Skip to content

Commit 51734b9

Browse files
authored
Add circleci (#5)
* add circleci * simplify circleci config * run dtslint --installAll when setting up the project
1 parent 9c9f1e8 commit 51734b9

1 file changed

Lines changed: 71 additions & 0 deletions

File tree

.circleci/config.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
aliases:
2+
- &working_directory ~/sql
3+
4+
- &node_image
5+
image: circleci/node:8
6+
environment:
7+
PGUSER: root
8+
9+
- &defaults
10+
working_directory: *working_directory
11+
docker:
12+
- *node_image
13+
14+
- &attach_environment
15+
at: ~/sql
16+
17+
version: 2
18+
jobs:
19+
# Set up environment and install required dependencies
20+
setup:
21+
<<: *defaults
22+
steps:
23+
- checkout
24+
- restore-cache:
25+
key: yarn-packages-{{ checksum "yarn.lock" }}
26+
- run: yarn
27+
- run: yarn dtslint --installAll
28+
- save-cache:
29+
key: yarn-packages-{{ checksum "yarn.lock" }}
30+
paths:
31+
- node_modules/
32+
- persist_to_workspace:
33+
root: .
34+
paths: .
35+
36+
lint:
37+
<<: *defaults
38+
steps:
39+
- attach_workspace: *attach_environment
40+
- run: yarn run lint
41+
42+
dtslint:
43+
<<: *defaults
44+
steps:
45+
- attach_workspace: *attach_environment
46+
- run: yarn run dtslint
47+
48+
test:
49+
<<: *defaults
50+
steps:
51+
- attach_workspace: *attach_environment
52+
- run: yarn run test
53+
54+
workflows:
55+
version: 2
56+
57+
test:
58+
jobs:
59+
- setup
60+
61+
- lint:
62+
requires:
63+
- setup
64+
65+
- dtslint:
66+
requires:
67+
- setup
68+
69+
- test:
70+
requires:
71+
- setup

0 commit comments

Comments
 (0)