@agorize/gommette
Version:
68 lines (58 loc) • 1.25 kB
YAML
version: 2
defaults:
working_directory: ~/repo
docker:
- image: circleci/node:10.23.1
jobs:
test:
<<:
steps:
- checkout
- run: yarn
- run:
name: Run tests unit
command: yarn test
- save_cache:
paths:
- node_modules
key: v1-dependencies-
build:
<<:
steps:
- checkout
- run: yarn
- run:
name: Build package
command: yarn build
- persist_to_workspace:
root: ~/repo
paths: .
release:
<<:
steps:
- attach_workspace:
at: ~/repo
- run:
name: release
command: yarn run semantic-release || true
- run:
name: Notify on Slack
when: on_success
command: yarn notify $(git log --format=oneline -n 1)
- run:
name: Notify on Slack
when: on_fail
command: yarn notify $(git log --format=oneline -n 1) error
workflows:
version: 2
test-deploy:
jobs:
- test
- build
- release:
requires:
- test
- build
filters:
branches:
only: /^master$/