Skip to content

Commit 738a699

Browse files
authored
chore(ci): add CircleCI config (#91)
1 parent 5bb9dce commit 738a699

File tree

1 file changed

+84
-0
lines changed

1 file changed

+84
-0
lines changed

.circleci/config.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
version: 2
2+
jobs:
3+
node8.10_pg9.6:
4+
docker:
5+
- image: circleci/node:8.10
6+
- image: circleci/postgres:9.6-alpine
7+
environment:
8+
POSTGRES_USER: circleci
9+
POSTGRES_DB: circle_test
10+
steps:
11+
- checkout
12+
- run: sudo apt update
13+
- run: sudo apt install -y postgresql-client
14+
- restore_cache:
15+
keys:
16+
- yarn-packages-{{ checksum "yarn.lock" }}
17+
- run:
18+
command: yarn install --frozen-lockfile
19+
- save_cache:
20+
key: yarn-packages-{{ checksum "yarn.lock" }}
21+
paths:
22+
- ~/.cache/yarn
23+
- run: yarn lint
24+
- run:
25+
command: yarn test
26+
environment:
27+
TEST_DATABASE_URL: postgres://circleci@localhost:5432/circle_test
28+
node10_pg10:
29+
docker:
30+
- image: circleci/node:10
31+
- image: circleci/postgres:10-alpine
32+
environment:
33+
POSTGRES_USER: circleci
34+
POSTGRES_DB: circle_test
35+
steps:
36+
- checkout
37+
- run: sudo apt update
38+
- run: sudo apt install -y postgresql-client
39+
- restore_cache:
40+
keys:
41+
- yarn-packages-{{ checksum "yarn.lock" }}
42+
- run:
43+
command: yarn install --frozen-lockfile
44+
- save_cache:
45+
key: yarn-packages-{{ checksum "yarn.lock" }}
46+
paths:
47+
- ~/.cache/yarn
48+
- run: yarn lint
49+
- run:
50+
command: yarn test
51+
environment:
52+
TEST_DATABASE_URL: postgres://circleci@localhost:5432/circle_test
53+
node10_pg11:
54+
docker:
55+
- image: circleci/node:10
56+
- image: circleci/postgres:11-alpine
57+
environment:
58+
POSTGRES_USER: circleci
59+
POSTGRES_DB: circle_test
60+
steps:
61+
- checkout
62+
- run: sudo apt update
63+
- run: sudo apt install -y postgresql-client
64+
- restore_cache:
65+
keys:
66+
- yarn-packages-{{ checksum "yarn.lock" }}
67+
- run:
68+
command: yarn install --frozen-lockfile
69+
- save_cache:
70+
key: yarn-packages-{{ checksum "yarn.lock" }}
71+
paths:
72+
- ~/.cache/yarn
73+
- run: yarn lint
74+
- run:
75+
command: yarn test
76+
environment:
77+
TEST_DATABASE_URL: postgres://circleci@localhost:5432/circle_test
78+
workflows:
79+
version: 2
80+
test:
81+
jobs:
82+
- node8.10_pg9.6
83+
- node10_pg10
84+
- node10_pg11

0 commit comments

Comments
 (0)