Skip to content

Commit

Permalink
feat: setup reg-suit (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
Naturalclar committed Aug 5, 2020
1 parent 5128078 commit f3fef9e
Show file tree
Hide file tree
Showing 5 changed files with 1,712 additions and 80 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/test.yml
Expand Up @@ -40,3 +40,25 @@ jobs:
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- run: yarn
- run: yarn type-check
visual-regression:
runs-on: ubuntu-18.04
strategy:
matrix:
node-version: [10.18.1]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- run: yarn
- name: Capture Screenshots
run: yarn storycap:all
- name: Run visual-regression test
run: yarn reg-suit
6 changes: 5 additions & 1 deletion .gitignore
Expand Up @@ -8,4 +8,8 @@ storybook-static
# yarn error logs
yarn-error.log

.now
.now

# reg-suit
.reg
__screenshots__
41 changes: 24 additions & 17 deletions package.json
Expand Up @@ -2,9 +2,10 @@
"name": "react-native-sketchbook",
"version": "0.0.2-alpha.15",
"description": "Design System for React Native",
"author": "Jesse Katsumata <jesse.katsumata@gmail.com>",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"keywords": [
"react-native",
"design-system"
],
"homepage": "https://github.com/Naturalclar/react-native-sketchbook#readme",
"bugs": {
"url": "https://github.com/Naturalclar/react-native-sketchbook/issues"
Expand All @@ -14,13 +15,24 @@
"url": "git+https://github.com/Naturalclar/react-native-sketchbook.git"
},
"license": "MIT",
"author": "Jesse Katsumata <jesse.katsumata@gmail.com>",
"main": "dist/index.js",
"types": "dist/index.d.ts",
"files": [
"dist"
],
"keywords": [
"react-native",
"design-system"
],
"scripts": {
"build": "tsc",
"build-storybook": "build-storybook",
"deploy": "now",
"lint": "eslint src --ext .ts,.tsx --cache",
"prepare": "yarn build",
"storybook": "start-storybook -p 6006",
"type-check": "tsc --noEmit",
"reg-suit": "reg-suit run",
"storycap:all": "rm -rf ./__screenshots__ && yarn storycap http://localhost:6006 --serverCmd 'yarn storybook --ci' --viewport '414x736' --serverTimeout '200000'"
},
"dependencies": {},
"devDependencies": {
"@babel/core": "^7.9.0",
"@react-native-community/eslint-config": "^2.0.0",
Expand All @@ -41,16 +53,11 @@
"react": "16.13.1",
"react-dom": "16.13.1",
"react-native-web": "^0.13.1",
"reg-keygen-git-hash-plugin": "^0.8.5",
"reg-notify-github-plugin": "^0.8.5",
"reg-publish-s3-plugin": "^0.9.0",
"reg-suit": "^0.10.2",
"storycap": "^2.3.5",
"typescript": "^3.8.3"
},
"dependencies": {},
"scripts": {
"prepare": "yarn build",
"build": "tsc",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook",
"lint": "eslint src --ext .ts,.tsx --cache",
"type-check": "tsc --noEmit",
"deploy": "now"
}
}
16 changes: 16 additions & 0 deletions regconfig.json
@@ -0,0 +1,16 @@
{
"core": {
"workingDir": ".reg",
"actualDir": "__screenshots__",
"thresholdRate": 0
},
"plugins": {
"reg-keygen-git-hash-plugin": true,
"reg-notify-github-plugin": {
"clientId": "MzK1NDYzNzcw0S9KTUwu0c1LLMksS9Utzk4tSc5Iys/P1jc0Bymx1PdLLCktSsxJzkksAgA="
},
"reg-publish-s3-plugin": {
"bucketName": "reg-publish-bucket-d8a689ab-46be-45db-9995-d4265e7ac00e"
}
}
}

1 comment on commit f3fef9e

@vercel
Copy link

@vercel vercel bot commented on f3fef9e Aug 5, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.