58 lines
1.7 KiB
YAML
Raw Normal View History

2017-11-28 23:37:46 -05:00
version: 2
jobs:
2018-12-30 20:07:20 -05:00
build-and-test:
2018-10-14 23:14:03 -04:00
docker:
2019-02-21 15:02:51 -05:00
- image: 'circleci/node:latest'
2018-10-14 23:14:03 -04:00
steps:
- checkout
- restore_cache:
keys:
- yarn-v1-{{ .Branch }}-{{ checksum "yarn.lock" }}
- yarn-v1-{{ .Branch }}-
- yarn-v1-
- run:
2018-12-30 19:58:40 -05:00
name: Install
2018-10-14 23:14:03 -04:00
command: yarn install
- run:
name: Lint
command: yarn lint
2018-10-14 23:14:03 -04:00
- run:
2018-12-30 19:58:40 -05:00
name: Build
command: yarn build
- run:
name: Test
2019-02-21 22:31:09 -05:00
command: yarn test --coverage --coverageReporters lcov
2019-02-21 14:58:01 -05:00
- run:
name: Upload Test Coverage
2019-02-21 22:31:09 -05:00
command: bash <(curl -s https://codecov.io/bash) -f coverage/lcov.info
2018-10-14 23:14:03 -04:00
- save_cache:
paths:
- ~/.cache/yarn
2018-10-15 00:36:56 -04:00
key: yarn-v1-{{ .Branch }}-{{ checksum "yarn.lock" }}
2018-12-30 19:58:40 -05:00
- persist_to_workspace:
2018-12-30 20:07:20 -05:00
root: .
paths:
2018-12-30 20:25:54 -05:00
- .
2018-12-30 19:58:40 -05:00
release:
docker:
2019-02-21 15:02:51 -05:00
- image: 'circleci/node:latest'
2018-12-30 19:58:40 -05:00
steps:
- attach_workspace:
2018-12-30 20:07:20 -05:00
at: .
2018-12-30 19:58:40 -05:00
- run:
2018-12-30 20:07:20 -05:00
name: Release
command: yarn semantic-release
2018-12-30 19:58:40 -05:00
workflows:
version: 2
2018-12-30 20:07:20 -05:00
build-test-publish:
2018-12-30 19:58:40 -05:00
jobs:
2018-12-30 20:07:20 -05:00
- build-and-test
2018-12-30 20:05:48 -05:00
- release:
2018-12-30 20:17:31 -05:00
filters:
branches:
only:
- master
requires:
- build-and-test