2017-08-13 11:38:50 +00:00
|
|
|
version: 2
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
working_directory: /usr/src/app
|
|
|
|
docker:
|
|
|
|
- image: banian/node
|
|
|
|
steps:
|
|
|
|
# Checkout repository
|
|
|
|
- checkout
|
|
|
|
|
|
|
|
# Restore cache
|
|
|
|
- restore_cache:
|
|
|
|
key: yarn-{{ checksum "yarn.lock" }}
|
|
|
|
|
|
|
|
# Install dependencies
|
|
|
|
- run:
|
|
|
|
name: Install Dependencies
|
|
|
|
command: NODE_ENV=dev yarn
|
|
|
|
|
|
|
|
# Keep cache
|
|
|
|
- save_cache:
|
|
|
|
key: yarn-{{ checksum "yarn.lock" }}
|
|
|
|
paths:
|
|
|
|
- "node_modules"
|
|
|
|
|
|
|
|
# Build
|
|
|
|
# - run:
|
|
|
|
# name: Build
|
|
|
|
# command: |
|
|
|
|
# mkdir -p dist
|
|
|
|
# yarn build
|
|
|
|
|
|
|
|
# Test
|
|
|
|
- run:
|
|
|
|
name: Tests
|
2017-08-13 12:19:43 +00:00
|
|
|
command: yarn test && yarn codecov
|