Skip to content

Commit

Permalink
add circle
Browse files Browse the repository at this point in the history
  • Loading branch information
hipstersmoothie committed Mar 6, 2019
1 parent 0f7a16e commit 18ba236
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 1 deletion.
88 changes: 88 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
version: 2

defaults: &defaults
working_directory: ~/storybook-dark-mode
docker:
- image: circleci/node:latest-browsers

jobs:
install:
<<: *defaults
steps:
- checkout
- restore_cache:
keys:
# Find a cache corresponding to this specific package.json checksum
# when this file is changed, this key will fail
- storybook-dark-mode-{{ .Branch }}-{{ checksum "yarn.lock" }}-{{ checksum ".circleci/config.yml" }}
- storybook-dark-mode-{{ .Branch }}-{{ checksum "yarn.lock" }}
- storybook-dark-mode-{{ .Branch }}
# Find the most recent cache used from any branch
- storybook-dark-mode-master
- storybook-dark-mode-
- run:
name: Install Dependencies
command: yarn install --frozen-lockfile
- save_cache:
key: storybook-dark-mode-{{ .Branch }}-{{ checksum "yarn.lock" }}-{{ checksum ".circleci/config.yml" }}
paths:
- node_modules
- ~/.cache/yarn
- persist_to_workspace:
root: .
paths:
- .

lint:
<<: *defaults
steps:
- attach_workspace:
at: ~/storybook-dark-mode
- run:
name: Lint
command: yarn lint

build:
<<: *defaults
steps:
- attach_workspace:
at: ~/storybook-dark-mode
- run:
name: Build
command: yarn build
- persist_to_workspace:
root: .
paths:
- .

release:
<<: *defaults
steps:
- attach_workspace:
at: ~/storybook-dark-mode
- run:
name: Release
command: yarn release

workflows:
version: 2
build_and_test:
jobs:
- install

- lint:
requires:
- install

- build:
requires:
- install

- release:
requires:
- lint
- build
filters:
branches:
only:
- master
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
},
"scripts": {
"lint": "eslint --ext .ts --ext .tsx src/**",
"build": "tsc"
"build": "tsc",
"release": "auto shipit"
},
"peerDependencies": {
"react": "*"
Expand Down

0 comments on commit 18ba236

Please sign in to comment.