Skip to content

Commit

Permalink
Merge pull request #56 from storybooks/circle-ci
Browse files Browse the repository at this point in the history
add circle config
  • Loading branch information
hipstersmoothie authored Mar 18, 2019
2 parents a7c628c + 7cee119 commit 5a28b5b
Show file tree
Hide file tree
Showing 3 changed files with 984 additions and 720 deletions.
79 changes: 79 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
version: 2

defaults: &defaults
working_directory: ~/storybook-addon-jsx
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-addon-jsx-{{ .Branch }}-{{ checksum "yarn.lock" }}-{{ checksum ".circleci/config.yml" }}
- storybook-addon-jsx-{{ .Branch }}-{{ checksum "yarn.lock" }}
- storybook-addon-jsx-{{ .Branch }}
# Find the most recent cache used from any branch
- storybook-addon-jsx-master
- storybook-addon-jsx-
- run:
name: Install Dependencies
command: yarn install --frozen-lockfile
- save_cache:
key: storybook-addon-jsx-{{ .Branch }}-{{ checksum "yarn.lock" }}-{{ checksum ".circleci/config.yml" }}
paths:
- node_modules
- ~/.cache/yarn
- persist_to_workspace:
root: .
paths:
- .

test:
<<: *defaults
steps:
- attach_workspace:
at: ~/storybook-addon-jsx
- run:
name: Test
command: yarn test

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

workflows:
version: 2
build_and_test:
jobs:
- install:
filters:
tags:
only: /.*/

- test:
requires:
- install
filters:
tags:
only: /.*/

- build:
requires:
- install
filters:
tags:
only: /.*/
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@
"@types/storybook__react": "^4.0.1",
"auto": "^4.8.11",
"babel-core": "^7.0.0-bridge.0",
"babel-jest": "^23.6.0",
"babel-jest": "^24.5.0",
"babel-loader": "^8.0.5",
"husky": "^1.3.1",
"jest": "test",
"jest": "^24.5.0",
"lint-staged": "^8.1.5",
"prettier": "^1.15.2",
"prop-types": "^15.6.2",
Expand All @@ -68,8 +68,8 @@
"typescript": "^3.3.3333"
},
"peerDependencies": {
"@storybook/addons": "^5.0.1",
"@babel/core": "^7.1.2",
"@storybook/addons": "^5.0.1",
"react": "^16.2.0",
"react-dom": "^16.2.0"
},
Expand Down
Loading

0 comments on commit 5a28b5b

Please sign in to comment.