1 |
|
2 |
|
3 |
|
4 |
|
5 | version: 2
|
6 | jobs:
|
7 | test:
|
8 | docker:
|
9 |
|
10 | - image: circleci/node:lts
|
11 | environment:
|
12 | TZ: "Europe/London"
|
13 | PG_CONNECTION_STRING: postgres://postgres:postgres@localhost:5432/circle_test
|
14 |
|
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 |
|
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 |
|
50 | workflows:
|
51 | version: 2
|
52 | test_and_release:
|
53 | jobs:
|
54 | - test
|
55 | - release:
|
56 | requires:
|
57 | - test
|
58 | filters:
|
59 | branches:
|
60 | only: master
|