UNPKG

1.32 kBYAMLView Raw
1# Javascript Node CircleCI 2.0 configuration file
2#
3# Check https://circleci.com/docs/2.0/language-javascript/ for more details
4#
5version: 2
6jobs:
7 test:
8 docker:
9 # use node:lts
10 - image: circleci/node:lts
11 environment:
12 TZ: "Europe/London"
13 PG_CONNECTION_STRING: postgres://postgres:postgres@localhost:5432/circle_test
14 # use postgres 9.6
15 - image: circleci/postgres:9.6-alpine-postgis
16 environment:
17 POSTGRES_USER: postgres
18 POSTGRES_DB: circle_test
19 working_directory: ~/repo
20 steps:
21 - checkout
22 - run:
23 name: install
24 command: npm install
25 - run:
26 name: test
27 command: npm test
28 - run:
29 name: codecov
30 command: npm run coverage
31 release:
32 docker:
33 # use node:lts
34 - image: circleci/node:lts
35 environment:
36 TZ: "Europe/London"
37 working_directory: ~/repo
38 steps:
39 - checkout
40 - run:
41 name: install
42 command: npm install
43 - run:
44 name: release
45 command: |
46 chmod +x version_plugin
47 npx semantic-release
48
49
50workflows:
51 version: 2
52 test_and_release:
53 jobs:
54 - test
55 - release:
56 requires:
57 - test
58 filters:
59 branches:
60 only: master