Skip to content

Commit

Permalink
Merge branch 'master' into sharding
Browse files Browse the repository at this point in the history
  • Loading branch information
Quramy authored Feb 2, 2023
2 parents 387c99b + 62bcea3 commit ccf01c2
Show file tree
Hide file tree
Showing 61 changed files with 185 additions and 24,094 deletions.
78 changes: 0 additions & 78 deletions .circleci/config.yml

This file was deleted.

15 changes: 8 additions & 7 deletions .github/workflows/nodejs.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Node.js CI
name: Unit test

on:
push:
Expand All @@ -9,19 +9,20 @@ on:

jobs:
build:
runs-on: ${{ matrix.os }}

strategy:
matrix:
os: [ubuntu-latest, windows-latest]
node-version: [16.x]
os: [ubuntu-latest]
node-version: [18.x]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn install --frozen-lockfile
- run: yarn bootstrap
- run: yarn build
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/integrated_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Integrated Test

on:
push:
branches:
- master
- next
pull_request:

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
example_dir:
- examples/v5-managed-react-legacy-decorator
- examples/v5-simple
- examples/v6-managed-react
- examples/v6-simple
- examples/v6-story-store-v7

steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: 'yarn'
- run: yarn install --frozen-lockfile
- run: yarn bootstrap
- run: yarn build
- run: yarn e2e ${{ matrix.example_dir }}
env:
CI: true
32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: publish

on:
push:
tags:
- '*'

jobs:
publish:
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [18.x]

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'
- run: yarn install --frozen-lockfile
- run: yarn bootstrap
- name: npm publish
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" > ~/.npmrc
npm whoami
yarn deploy:ci
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
CI: true
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ typings/


# End of https://www.gitignore.io/api/node
*.tsbuildinfo
.DS_Store
lib/
lib-esm/
__screenshot__
__screenshots__
.reg
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
![DEMO](https://raw.githubusercontent.com/reg-viz/storycap/artwork/demo_v2.gif)

[![npm](https://img.shields.io/npm/v/storycap.svg?style=flat-square)](https://www.npmjs.com/package/storycap)
[![CircleCI](https://circleci.com/gh/reg-viz/storycap.svg?style=svg)](https://circleci.com/gh/reg-viz/storycap)

> A [Storybook][storybook] Addon, Save the screenshot image of your stories :camera: via [Puppeteer][puppeteer].
Expand Down Expand Up @@ -362,7 +361,7 @@ Options:
--silent [boolean] [default: false]
--verbose [boolean] [default: false]
--serverCmd Command line to launch Storybook server. [string] [default: ""]
--serverTimeout Timeout [msec] for starting Storybook server. [number] [default: 20000]
--serverTimeout Timeout [msec] for starting Storybook server. [number] [default: 60000]
--shard The sharding options for this run. In the format <shardNumber>/<totalShards>.
<shardNumber> is a number between 1 and <totalShards>. <totalShards> is the total
number of computers working. [string] [default: "1/1"]
Expand Down Expand Up @@ -544,11 +543,9 @@ You can change search channel with `--chromiumChannel` option or set executable
Storycap is tested with the followings versions:

- Simple mode:
- [x] Storybook v4.x
- [x] Storybook v5.x
- [x] Storybook v6.x
- Managed mode:
- [x] Storybook v4.x
- [x] Storybook v5.x
- [x] Storybook v6.x

Expand Down
4 changes: 2 additions & 2 deletions e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ function run() {
echo ""
}

total=${CIRCLE_NODE_TOTAL:-1}
current_idx=${CIRCLE_NODE_INDEX:-0}
total=${NODE_TOTAL:-1}
current_idx=${NODE_INDEX:-0}

rm -rf __screenshots__
mkdir -p __screenshots__/examples
Expand Down
21 changes: 0 additions & 21 deletions examples/v4-managed-react/.gitignore

This file was deleted.

5 changes: 0 additions & 5 deletions examples/v4-managed-react/.storybook/addons.js

This file was deleted.

15 changes: 0 additions & 15 deletions examples/v4-managed-react/.storybook/config.js

This file was deleted.

Loading

0 comments on commit ccf01c2

Please sign in to comment.