Skip to content

Commit

Permalink
ci(circle): cache dependencies [ch2770]
Browse files Browse the repository at this point in the history
  • Loading branch information
exactlyaron committed Oct 23, 2020
1 parent 504f15d commit ae7c5c3
Showing 1 changed file with 30 additions and 15 deletions.
45 changes: 30 additions & 15 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,30 @@ version: 2
jobs:
unit test:
docker:
# use node:lts
- image: cimg/node:lts
environment:
TZ: "Europe/London"
PG_CONNECTION_STRING: postgres://postgres:postgres@localhost:5432/circle_test
# use postgres 9.6
TZ: "Europe/London"
PG_CONNECTION_STRING: postgres://postgres:postgres@localhost:5432/circle_test
TIMEOUT: 15000
- image: circleci/postgres:9.6-alpine-postgis-ram
environment:
POSTGRES_USER: postgres
POSTGRES_DB: circle_test
TZ: "Europe/London"
working_directory: ~/repo
steps:
- checkout
- restore_cache:
keys:
- v1-deps-{{ checksum "package.json" }}
- v1-deps-
- run:
name: install
command: npm install
- save_cache:
key: v1-deps-{{ checksum "package.json" }}
paths:
- node_modules
- run:
name: test
command: npm test
Expand All @@ -38,19 +46,26 @@ jobs:
command: npm run lint
release:
docker:
# use node:lts
- image: cimg/node:lts
environment:
TZ: "Europe/London"
- image: cimg/node:lts
environment:
TZ: "Europe/London"
working_directory: ~/repo
steps:
- checkout
- run:
name: install
command: npm install
- run:
name: release
command: npx semantic-release
- checkout
- restore_cache:
keys:
- v1-deps-{{ checksum "package.json" }}
- v1-deps-
- run:
name: install
command: npm install
- save_cache:
key: v1-deps-{{ checksum "package.json" }}
paths:
- node_modules
- run:
name: release
command: npx semantic-release
workflows:
version: 2
test_and_release:
Expand Down

0 comments on commit ae7c5c3

Please sign in to comment.