ci: add circleci config.yml

This commit is contained in:
Haishan 2018-10-27 17:08:25 +08:00 committed by haishanh
parent abfab4f1ad
commit ae3fd6bcaf
2 changed files with 35 additions and 2 deletions

33
.circleci/config.yml Normal file
View file

@ -0,0 +1,33 @@
version: 2
jobs:
build:
branches:
only:
- master
- dev
working_directory: ~/code
docker:
- image: circleci/node:10.12.0-stretch
steps:
- checkout
- restore_cache:
name: Restore Yarn Package Cache
keys:
- yarn-packages-{{ checksum "yarn.lock" }}
- run:
name: Install Dependencies
command: yarn install
- save_cache:
name: Save Yarn Package Cache
key: yarn-packages-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/yarn
- run:
name: lint
command: yarn lint
- run:
name: build
command: yarn build
- store_artifacts:
path: public/report.html
prefix: ''

View file

@ -7,7 +7,7 @@ import Switch from 'c/Switch';
import Button from 'c/Button';
// import Modal from 'c/Modal';
// import APIConfig from 'c/APIConfig';
import Proxy2 from 'c/Proxy2';
import Proxy from 'c/Proxy';
const paneStyle = {
padding: '20px 0'
@ -38,7 +38,7 @@ class StyleGuide extends PureComponent {
return (
<div>
<Pane>
<Proxy2 />
<Proxy />
</Pane>
<Pane>
<Switch />