Skip to content

Commit

Permalink
SETUP github action && overhaul CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen committed Oct 18, 2019
1 parent e6b0869 commit d808273
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 6 deletions.
24 changes: 19 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
version: 2
jobs:
build:
lint:
docker:
- image: circleci/node:8.10.0
- image: circleci/node:10

working_directory: ~/repo

steps:
- checkout

- restore_cache:
keys:
- v1-dependencies-{{ checksum "package.json" }}
- v1-dependencies-

- run: yarn install
- run: yarn lint
chromatic:
docker:
- image: circleci/node:10

working_directory: ~/repo

Expand All @@ -21,7 +37,5 @@ jobs:
- node_modules
key: v1-dependencies-{{ checksum "package.json" }}

# - run: yarn lint

- run: yarn build
- run: yarn build-storybook
- run: yarn chromatic --storybook-build-dir storybook-static --exit-zero-on-changes
21 changes: 21 additions & 0 deletions .github/workflows/chromatic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "Chromatic"
on:
pull_request:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: |
yarn
- run: |
yarn build
- run: |
yarn build-storybook
- uses: chromaui/action@v1
with:
appCode: ${{ secrets.CHROMATIC_APP_CODE }}
token: ${{ secrets.GITHUB_TOKEN }}
storybookBuildDir: storybook-static

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
"build": "babel src -d dist",
"build-docs": "build-storybook --docs",
"build-storybook": "build-storybook",
"chromatic": "CHROMATIC_APP_CODE=9ofhn0iql7n chromatic test",
"lint": "eslint .",
"lint:js": "cross-env NODE_ENV=production eslint --cache --cache-location=.cache/eslint --ext .js,.jsx,.html,.ts,.tsx,.mjs --report-unused-disable-directives",
"lint:package": "sort-package-json",
Expand Down

0 comments on commit d808273

Please sign in to comment.